dir combien il y a de d encodeur de bouton le type de lcd) il faut juste configurer dans le main ou il y a d autre fichier a modifier
ALors pour les encodeurs ca n’est pas dans le main, mais dans le fichier mios_tables.inc. Dans la 2eme partie plus précisément, qui commence ainsi :
org 0x3280 ; never change the origin!
;; --------------------------------------------------------------------------
;; In this table DIN pins have to be assigned to rotary encoders for the
;; MIOS_ENC driver
;;
;; up to 64 entries are provided
;;
;; The table must be terminated with an ENC_EOT entry. Unused entries should
;; be filled with ENC_EOT
;;
;; ENC_ENTRY provides following parameters
;; o first parameter: number of shift register - 1, 2, 3, ... 16
;; o second parameter: number of pin; since two pins are necessary
;; for each encoder, an even number is expected: 0, 2, 4 or 6
;; o the third parameter contains the encoder mode:
;; either MIOS_ENC_MODE_NON_DETENTED
;; or MIOS_ENC_MODE_DETENTED
;;
;; Configuration Examples:
;; ENC_ENTRY 1, 0, MIOS_ENC_MODE_NON_DETENTED ; non-detented encoder at pin
0 and 1 of SR 1
;; ENC_ENTRY 1, 2, MIOS_ENC_MODE_DETENTED ; detented encoder at pin 2 a
nd 3 of SR 1
;; ENC_ENTRY 9, 6, MIOS_ENC_MODE_NON_DETENTED ; non-detented encoder at pin
6 and 7 of SR 9
;; --------------------------------------------------------------------------
;; encoder entry structure
ENC_ENTRY MACRO sr, din_0, mode
dw (mode << 8) | (din_0 + 8*(sr-1))
ENDM
ENC_EOT MACRO
dw 0xffff
ENDM
MIOS_ENC_PIN_TABLE
;; encoders 1-16
;; SR Pin Mode
ENC_ENTRY 1, 0, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 1
ENC_ENTRY 1, 2, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 2
ENC_ENTRY 1, 4, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 3
ENC_ENTRY 1, 6, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 4
ENC_ENTRY 2, 0, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 5
ENC_ENTRY 2, 2, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 6
ENC_ENTRY 2, 4, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 7
ENC_ENTRY 2, 6, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 8
ENC_ENTRY 3, 0, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 9
ENC_ENTRY 3, 2, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 10
ENC_ENTRY 3, 4, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 11
ENC_ENTRY 3, 6, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 12
ENC_ENTRY 4, 0, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 13
ENC_ENTRY 4, 2, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 14
ENC_ENTRY 4, 4, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 15
ENC_ENTRY 4, 6, MIOS_ENC_MODE_NON_DETENTED ; V-Pot 16
En fait la on déclare seulement ou sont les encodeurs (comme ils sont cablé sur les DIN, comme les switchs). Ensuite, pour le LCD, le type doit etre modifier dans le deviceID du PIC, si tu utilise un ecran lcd alphanumérique standard, il ne devrait avoir riena faire.
Maintenant pour définir a quel fonction correspond quel bouton, il y a un fichier dédié en general qui permet de faire le mapping.