CC5X may already include internal-EEPROM handling code, but I couldn't find any. With this in mind, here are two short methods for writing and reading from the EEPROM in many PIC microcontrollers. (Based on Microchips datasheets and a forum post.)
Continue reading "EEPROM read/write code for CC5X"
CC5X
Code
EEPROM
Howto
PIC
Posted by spiffed at 12:00 AM
| Comments (0)
Porting code between PIC micros from the same product range is normally a smooth process: redefine a few pins, change some clock-speed constants, and add support code for that new integrated peripheral widget.
Sometimes though, there's a large hurdle before you can even begin. The 16F737 posed such a hurdle, there are a few clever lines of code required to put the device into all digital I/O running under the internal oscillator (intosc).
Continue reading "Getting up to speed with the PIC16F737"
Code
PIC
Posted by spiffed at 10:44 PM
| Comments (0)
In the beginning, I fell in love with the Kitsrus Kit 150 PIC programmer for it's socketed automatic programming mode. The kit was priced right, supported most of the chips I encounter, and available locally. Over the years, I've ended up with five of them.
Recently, I discovered none of them function for ICSP or 40-pin parts. (Normally I use a JDM2 clone for ICSP, this was the first test of the K150.)
Obviously, some investigation was in order.
Continue reading "Repairing a KITSRUS Kit 150 for ICSP"
Howto
Kit
KitsRUs
PIC
Programmer
Repair
Solder
Posted by spiffed at 8:39 PM
| Comments (0)
For hobbyists, kit builders, and lovers of lead, MicrochipDirect is selling off non-RoHS compliant inventory for steep discounts.
I was able to pickup some chips for less than 40% of their normal price. The best deals are on SMD parts, but most PICs are available in 1-off for less than their normal 25-off cost.
PIC
RHOS
Sale
SMD
Posted by spiffed at 1:42 AM
Matrix Orbital makes a number of rather nice serial (and USB based) LCD and VFDs. What they do not make, are inexpensive LCDs. Thankfully, hacking serial onto a cheap parallel LCD is sometimes almost as good.
Continue reading "Serial LCD Controller"
Code
Kit
LCD
PIC
Serial
SerialLCD
Posted by spiffed at 1:11 PM
We just don't do small. So when it came to choosing stepper motors, I picked nice beefy 2lb bipolar beasts. Driving these has, however, turned into a bit of a problem.
Continue reading "A bigger basic H-bridge"
FET
H-Bridge
Kit
Optoisolator
PCB
PIC
Transistors
Posted by spiffed at 8:20 PM
I recently mentioned that I could not convince C to read from PORTA of a PIC. I have seen the error of my ways. The only thing missing from my code was a single line to disable analog functions on PORTA. inserting CMCON = 0x07; into the top of main() nicely fixed the mysterious I/O failures.
Continue reading "Digital Input to the PIC16F628 in C"
Code
Howto
PIC
Posted by spiffed at 12:46 PM
This is a simple "welcome to the scary world of microcontrollers" circuit that counts up and down between 0 and 0xFF based on a PIC16F628, some LEDs and a 6V battery.
It could serve as a nice "welcome to the fun world of soldering", "welcome to the 2-bit world of binary", or (as I mentioned) "welcome to the scary world of microcontrollers" or, it might only be something with pretty flashing lights.
If you use an RSS reader, you can subscribe to a feed of all future entries tagged 'PIC'. [What is this?]