PropBasic Extension for SHIFTOUT
FriedV
Posts: 77
Hi Bean,
I think SHIFTOUT should have one more mode param for an inverted SPI clock (low or high active clock)
Cheers, Friedrich
I think SHIFTOUT should have one more mode param for an inverted SPI clock (low or high active clock)
Cheers, Friedrich
Comments
The SHIFTOUT command simply inverts the clock twice for each bit. So it depends on the state of the pin before the SHIFTOUT command.
Bean
Friedrich
The speed param can be max 511 as the compiler wants a constant?
What is the meaning of MSBPRE vs. MSBPOST? First vs. second clock edge?
If nothing specified for speed clock is 100 kHz?
Fried
511 is the max speed (largest constant on Propeller) even though you won't get 25Mhz clock. It will do the fastest it can.
If I remember correctly...MSBPRE reads the MSB bit on the data line BEFORE toggling the clock line, MSBPOST reads it AFTER toggling the clock line.
The options can be tricky, sometimes you need to play around before to get them right.
Bean