Category: PIC Projects
PIC18LF2550 Wireless 3-axis Accelerometer
Having a 2.4GHz Serial Link is helpful, but what kind of applications could it be utilized for? Well, I had a number of 1-axis accelerometers from Freescale (graciously provided by their samples department for my electronics lab projects), which I could use detect object orientation. Making the accelerometers wireless would allow for remote sensing of object orientation, which could be applied to virtual reality or possibly augmented cognition. In any case, it allows for some fun experimentation! Read More
PIC18LF2550 Wireless Servo Controller
I’ve wanted to make a remote control pan–tilt controller for my wireless camera for some time now. It can be used for remote monitoring, as a webcam, or for color/object tracking. The basis for a pan-tilt configuration is the PIC18LF2550 Wireless Servo Controller, which allows me to control two servos remotely with very little latency (a majority of which is due to the slow response of the hobby servos being used). Read More
PIC16F628 Serial 8 RGB LED Controller
This code is for a simple RGB LED controller for 8 LEDs using a PIC16F628. It is controlled by sending 3 bytes to the internal USART for the red, green, and blue color channels. The operation is very simple and so is the wiring. The PIC selects each LED then turns on/off the respective colors then goes to the next LED. Because of persistence of vision, the eye sees the LEDs as all being on at the same time.
JAL Libraries
Here are some of the libraries I have written for JAL:
675rs232_sw.jal | 675rs232_sw Software serial library for the PIC12F629/675 used in the PIC12F675 Oscilloscope. |
jpic628a.jal | jpic628a JPIC library for PIC16F628 microchips with serial routines and much more processor-specific code that allows one to take full advantage of the 628’s abilities. |
nibsBPs.jal | nibsBPs Simple library to convert bytes to nibbles (high and low) and bit-pairs. |
shiftIn.jal | shiftIn Simple library to shift data out using a clock and a data pin. Can provide the clock or use an external clock. |
shiftOut.jal | shiftOut Simple library to shift data in using a clock and a data pin. Can provide the clock or use an external clock. |
PIC16F628 8 RGB LED Controller
This code is for a simple RGB LED controller for 8 LEDs using a PIC16F628. The pattern is determined by the data in the EEPROM. Upon startup, the controller loads the data into RAM and starts up the sequence. The operation is very simple and so is the wiring. The PIC selects each LED then turns on/off the respective colors then goes to the next LED. Because of persistence of vision, the eye sees the LEDs as all being on at the same time. Currently the max number of display patterns is 20 (because the bank array is 80 bytes and each pattern is 4 bytes).
PIC12F675 Oscilloscope
This is a simple PC voltage oscilloscope using only a PIC12F675, a 20MHz oscillator, and a RS232 level shifter. The PIC takes a sample on GP2, immediately sends it to the PC at 115,200 baud using an software asynchronous serial routine, and repeats. It sends a 8-bit value that is read by the Visual Basic software and displayed on the screen (see examples below). The Visual Basic software deduces the time period between submissions and adjusts the display accordingly.