PDA

View Full Version : SPI comunication



Pedro Santos
- 27th September 2006, 18:47
Hello All

I use the Shifthout command

Shiftout sdata , sclk ,MSBFIRST, [Lcd_out]

to send bytes to a lcd, but i need more speed.
If i use the spi pin of the pic to send the bytes can i get more speed?

If yes, have anyone a example code how to send bytes with spi?

Thanks in advance

Regards

Pedro

mister_e
- 28th September 2006, 01:39
sure you'll get more speed. But is this really a must?

Why not changing to a higher speed crystal instead?

What kind of LCD are you using?

Joe Rocci
- 29th September 2006, 19:43
You can write a very simple PBP routine to operate the clock, data, and strobe lines into your SPI device, and it will be much faster and will occupy less code space that the SHIFTOUT function. I did this a while back and it worked fine. Unfortunately I don't have the code in front of me or I'd post it.

Joe