Working with PINS in C
kt88seamp
Posts: 112
In C lets say you want to make pin 8 an output and set it high·and all the other pins inputs. How·would you do it with the propeller?·
With the MSP430 microcontrollers·you simply would say something like:
P8DIR = 0x01 // Make pin 8 an output.
P8OUT = 0x01 // Make pin 8 high.
The imagecraft compiler does not work that way. I don't think you can work with individual bits like that. How do you with the propeller?
With the MSP430 microcontrollers·you simply would say something like:
P8DIR = 0x01 // Make pin 8 an output.
P8OUT = 0x01 // Make pin 8 high.
The imagecraft compiler does not work that way. I don't think you can work with individual bits like that. How do you with the propeller?
Comments
Don't know out of my head. But look into "propeller.h". If something like that exists, you'll find it there. Besides a mwait (IIRC).
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO