Go Down

Topic: Running 2 serial devices from an Arduino? CAN chip and TLC5940 (Read 3171 times) previous topic - next topic


Nov 23, 2012, 04:33 pm Last Edit: Nov 23, 2012, 04:36 pm by pylon Reason: 1
Im wondering if it is something to to with the fact that the hearer files include the SPI library,

Where in SPI.h or any other header included from there is SPICS defined? I cannot find it.

Whcih makes me thing that it uses part of the SPI and Arduino.H library to carry out all of the CS functions?

No, it doesn't.

Did you set the pin as an output in setup()?

Code: [Select]
pinMode(5, OUTPUT);
digitalWrite(5, HIGH); // disable first

Edit: changed to code tags to remove smiley display and added initial HIGH.



Thanks so much for the help, just what i needed



Well, it seems that it works on BIT_BANG, but it doesnt upate the LED's, fast enough

How can i run Both the MCP and TLC chips from the SPI bus, the CS and B;ank pins are now separate,

Do i need to add some clock timing between the devices?



I don't know the TLC chip very detailed but from the timing diagram in the datasheet I'd suppose that the chip doesn't have an SS/CS (Slave Select/Chip Select) input pin.

If you must have faster TLC output, give the chip a separate ATmega which you may connect by I2C to the master.

Well, it seems that it works on BIT_BANG, but it doesnt upate the LED's, fast enough

What speed do you need then? How fast is it now with BIT_BANG?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131