Go Down

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

pylon

#15
Nov 23, 2012, 04:33 pm Last Edit: Nov 23, 2012, 04:36 pm by pylon Reason: 1
Quote
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.

Quote
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.

Rich_P

PERFECT!!

Thanks so much for the help, just what i needed

Rich

Rich_P

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?

Cheers
Rich

pylon

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.

Quote
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