euh.. SHIFTOUT is already SPI!
Give us more details!
euh.. SHIFTOUT is already SPI!
Give us more details!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I believe Pedro means hardware SPI. With that assumption, it would be good to know which processor you are working with Pedro. Shiftout/in works very well and it's easy(Thanks Melabs!) buuuuut... It can be slow. How fast do you need to go?Originally Posted by mister_e
Ron
Hi Ron
Yes, i mean the hardware SPI
Like You say the Shifout work very good but it is slow, i need to send a byte
quickly to a lcd and perhaps with the hardware SPI pin can i have more speed
The controller that i use is PIC 18F452
Have You a sample code to do that, don't forget it must sent the MSBFIRST
Thanks
Regards
Pedro
Pedro,
There's a sample SPI program on the meLabs website.
http://www.melabs.com/resources/samples.htm
Look for spimast.bas
HTH,
DT
Hi
Yes i see the sample on melabs site but don't understand how to sent
with the spi out pin the msbit first, say bit7, bit6, bit5, ... bit0
Thanks for help
Pedro
Hello Darrel
my board work correct with this instruction
Shiftout sdata , sclk ,MSBFIRST, [var_out]
Do You know the correct SPI setup to use the hardware SPI to do that?
I try with this and have no function
'spi setup
SSPEN VAR SSPCON1.5 'SSP Enable bit
CKP VAR SSPCON1.4 'Clock Polarity Select
SMP VAR SSPSTAT.7 'Data input sample phase
CKE VAR SSPSTAT.6 'Clock Edge Select bit
TRISC = 0
CKP = 0 'clock idle low 'have changed to 1 for testing but no ok
CKE = 0 'transmit on idle to active transition 'have changed to 1 for testing
'but no ok
SSPIF = 0 'clear SPI interrupt
SMP = 0
main:
SSPEN = 1 'enable SPI pins
SSPBUF = var_out 'send array variable
Return
Have a idea how to fix that?
Thank You
Regards
Pedro
Bookmarks