I've been intrigued by 3D printing for quite a while now. Whilst I've liked the idea of playing with a 3D printer, I have not wanted to expend the time and effort required to individually source parts and, as I haven't really had a good plan of what to do with one once I've got it, the cost of buying the more consumer focused, pre-assembled ones has been just not been financially viable. After looking again a week or so ago I noticed that the cheaper kits, which (should - more on that later) contain all the parts needed, but require assembly, were reaching a price that I was prepared to pay on a whim. So after some limited research I decided to buy a "2016 Upgraded Full Quality High Precision Reprap Prusa i3 CTC DIY 3d Printer" from eBay.
I finally succumbed and bought a Raspberry Pi. I'd been holding out for quite a while, I had a ARM based NAS box (NAS4220) that I had bought a few years back with the intention of learning a bit more about Linux on ARM and as that was the only real reason I could think of for buying it, I didn't feel the need. A need did however finally present it's self, I wanted a small device to use to do some simple temperature logging. The Pi with a custom expansion board seemed like a fun way to get there and I could have fun doing some hardware development along the way with my etch tank. The requirements would be (fairly) simple:
- An I2C temperature sensor.
- An I2C battery backed Real Time Clock (to make logging data worthwhile, the Pi lacks a proper RTC).
- A transceiver for the serial port (not strictly needed for the scenario in mind, but would make the expansion board more useful).
Microcontroller development under Linux at times is still a little problematic. Many applications exist to enable compiling of C, assembly language and for programming many different microcontrollers. Here we will consider how to program Microchip's PIC family of microcontrollers.
Programming microcontrollers under Linux can be some what of a complicated task. The manufacturers of microcontrollers generally sell tools and provide software to program their devices, but these tools are produced only for one operating system. This operating system is not Linux...
So what is a "PIC"? Well, a PIC is a microcontroller sold by a company called Microchip. That's the short answer, the longer answer is that "PICmicro", usually shortened to "PIC" is the brand name for a family, in fact a series of families, of 8-bit RISC-based microcontrollers. RISC or "Reduced Instruction Set Computer" describes the philosophy of designing "a processor whose design is based on the rapid execution of a sequence of simple instructions rather than on the provision of a large variety of complex instructions".