How to access the input an output register bits using C
RudyC
Posts: 6
What is the most effective way of accessing several outputs or inputs of the PROP chip using the imagecraft C compiler?· I have tried several ways, I used the·blinkLed.c with only one output and had·expected results.· I then modified the code to only blink 1 led on my demo board but, I didn't get good results when I added another output.· I tried creating a structure, but don't know what I am doing wrong.· I hope this is an easy one for one of you, because I am trying to communicate with a DS1620 using the C code.
Comments
Bit numbers were wrong in CLR/SET/FLIP sorry. Corrected now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (jazzed) : 12/28/2008 9:24:23 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The obex C FullDuplexSerial is the best C serial driver library to use if you don't mind using a Propeller COG (The alternative is the ASIO library). I believe you are on a fair track. A better way (for me at least) would be to use a different kind of command for changing up to 3 bits at once. SET/CLR/FLIP are one bit at a time. Consider this:
I hope you get a chance to share DS1620 C library in obex when it is complete.
Best of luck with your project.
Steve
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔