bonjour à tous
dans les schemas du TLC la pin 13 est utilisée ( Arduino Playground - TLC5940 )
est ce que c est quelque chose que l on peut changer dans le .h, pour permettre de l utiliser avec un ethernet shield ( sans SD card ) ?
quelqu un a deja fait la manip ?
hum... là je commence à ne plus savoir...
si j ai bien suivi, en explorant les headers du TLC et notamment tlc_config.h et chip_includes.h, il faut que je change mon routage de pins en intervenant sur atmega_xx8.h
How to change the pin mapping:
- Arduino digital pin 0-7 = PORTD, PD0-7
- Arduino digital pin 8-13 = PORTB, PB0-5
- Arduino analog pin 0-5 = PORTC, PC0-5
je n'ai pas trouvé de fichier .o à supprimer dans le dossier de la librairie, ni dans l'arduino, de façon à ce que les changements des pins soient pris en compte.
Comme l'ethernet shield travaille sur les pins 4-9-10-11-13, je pensais tout simplement échanger les contacts
This is on digital pins 11, 12, and 13 on the Duemilanove and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the W5100 and pin 4 for the SD card.
En ouvrant le atmega_xx8.h, je pensais juste avoir à échanger des coordonnees de pins:
/** \file
SPI and timer pins for the ATmega168/48/88. Don't edit these. All
changeable pins are defined in tlc_config.h */
/** VPRG (Arduino digital pin 8) -> VPRG (TLC pin 27) */
#define DEFAULT_VPRG_PIN PB0
#define DEFAULT_VPRG_PORT PORTB
#define DEFAULT_VPRG_DDR DDRB
/** XERR (Arduino digital pin 12) -> XERR (TLC pin 16) */
#define DEFAULT_XERR_PIN PB4
#define DEFAULT_XERR_PORT PORTB
#define DEFAULT_XERR_DDR DDRB
#define DEFAULT_XERR_PINS PINB
/** SIN (Arduino digital pin 7) -> SIN (TLC pin 26) */
#define DEFAULT_BB_SIN_PIN PD7
#define DEFAULT_BB_SIN_PORT PORTD
#define DEFAULT_BB_SIN_DDR DDRD
/** SCLK (Arduino digital pin 4) -> SCLK (TLC pin 25) */
#define DEFAULT_BB_SCLK_PIN PD4
#define DEFAULT_BB_SCLK_PORT PORTD
#define DEFAULT_BB_SCLK_DDR DDRD
/** MOSI (Arduino digital pin 11) -> SIN (TLC pin 26) */
#define TLC_MOSI_PIN PB3
#define TLC_MOSI_PORT PORTB
#define TLC_MOSI_DDR DDRB
/** SCK (Arduino digital pin 13) -> SCLK (TLC pin 25) */
#define TLC_SCK_PIN PB5
#define TLC_SCK_PORT PORTB
#define TLC_SCK_DDR DDRB
/** SS will be set to output as to not interfere with SPI master operation.
If you have changed the pin-outs and the library doesn't seem to work
or works intermittently, make sure this pin is set correctly. This pin
will not be used by the library other than setting its direction to
output. */
#define TLC_SS_PIN PB2
#define TLC_SS_DDR DDRB
/** OC1A (Arduino digital pin 9) -> XLAT (TLC pin 24) */
#define XLAT_PIN PB1
#define XLAT_PORT PORTB
#define XLAT_DDR DDRB
/** OC1B (Arduino digital pin 10) -> BLANK (TLC pin 23) */
#define BLANK_PIN PB2
#define BLANK_PORT PORTB
#define BLANK_DDR DDRB
Seul hic, quand je fais l'essai avec ou ethernet shield et que j'échange juste une PIN ( 13 devient 4), tout script basic d animation de leds tombe à l eau.
/** SCK (Arduino digital pin 13) -> SCLK (TLC pin 25) */
#define TLC_SCK_PIN PB5
#define TLC_SCK_PORT PORTB
#define TLC_SCK_DDR DDRB
devient:
/** SCK (Arduino digital pin 13) -> SCLK (TLC pin 25) */
#define TLC_SCK_PIN PD4
#define TLC_SCK_PORT PORTD
#define TLC_SCK_DDR DDRD
je ne pensais pas toucher à la pin 4, du fait qu elle n est pas utilisée par le montage du TCL pour le démultiplexage
Est ce que quelqu un a une recommandation à me faire ?
hello, trouvé sur le forum anglais le hack de Tofe86. Ca marche nickel:
http://arduino.cc/forum/index.php/topic,22111.0.html
j'ai mis un set en ligne ici, avec une doc et une synthese en francais du hack ( dossier demultiplexeur):
http://www.le-chat-noir-numerique.fr/forums/viewtopic.php?f=18&p=2037#p2037