C Programming
From Mech
Jump to navigationJump to searchThe following files supply simple examples of C programming, and describe the processes which are taking place. These can be copied into the Windows IDE and programmed into a PIC18F4520.
- Digital Inputs
- Digital Outputs, by pins, one bit
- Digital Outputs, by ports, 8 bits
- Analog Inputs
- Comparators
- PWM outputs, for motor control
- Bi-Directional PWM Motor Control
- Text output to a serial LCD display
- Text output to a parallel LCD display
- Analog Output by 8-bit DAC
- Analog Output by I2C
- Interrupt on Timer for servo cycle
- Interrupt on external event
- Counters for encoders
- Quadrature decoding and counting
- Serial communication to a text window
- IR communication modulated at 38KHz
- Zigbee radio communication