M Mejinx New Member Feb 21, 2005 #1 Im trying to bit bang for a lab with the pic18f452 without using use RS232 but i wanna write it in C. How would i go about doing this? thanks
Im trying to bit bang for a lab with the pic18f452 without using use RS232 but i wanna write it in C. How would i go about doing this? thanks
B bmcculla New Member Feb 21, 2005 #2 The 8051 C compilers I've used have non-standard extensions to C to do sets and clears on bit addressable memory. A good compiler should recognise something like: PORT |= 0x01; as a set bit instruction. Try it and look at the disassembly to see what this C line translates to.
The 8051 C compilers I've used have non-standard extensions to C to do sets and clears on bit addressable memory. A good compiler should recognise something like: PORT |= 0x01; as a set bit instruction. Try it and look at the disassembly to see what this C line translates to.
Nigel Goodwin Super Moderator Most Helpful Member Feb 22, 2005 #3 Mejinx said: Im trying to bit bang for a lab with the pic18f452 without using use RS232 but i wanna write it in C. How would i go about doing this? thanks Click to expand... It's a fine example of why you should use assembler, it's trivial to do, and only takes a few lines.
Mejinx said: Im trying to bit bang for a lab with the pic18f452 without using use RS232 but i wanna write it in C. How would i go about doing this? thanks Click to expand... It's a fine example of why you should use assembler, it's trivial to do, and only takes a few lines.