Pages: 1 [2]   Go Down
Author Topic: Running 2 serial devices from an Arduino? CAN chip and TLC5940  (Read 1595 times)
0 Members and 1 Guest are viewing this topic.
Switzerland
Offline Offline
Faraday Member
**
Karma: 112
Posts: 5291
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
pinMode(5, OUTPUT);
digitalWrite(5, HIGH); // disable first

Edit: changed to code tags to remove smiley display and added initial HIGH.
« Last Edit: November 23, 2012, 10:36:51 am by pylon » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

PERFECT!!

Thanks so much for the help, just what i needed

Rich
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 60
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 112
Posts: 5291
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: 1 [2]   Go Up
Jump to: