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.
One of the things that has concerned me for a number of years is the fact that I am storing more and more important stuff on my PCs, electronic documents, source code and data files for home projects and a growing collection of videos and photos of my daughter (as well as those of my wife and I prior to her entering our lives). I need a good backup solution more now than ever.
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).
The Via VT1618 audio codec is used in a number of Via chipsets, including the VT8237, as found on the Via EPIA EN15000G and EN12000EG motherboards. These motherboards provide 3 audio jacks as part of the back panel I/O, Line-out, Line-in and Mic-in, however the Line-in and Mic-in connectors can also be switched in software to act as outputs, providing Rear (left and right), Center and LFE (subwoofer) channels. This seems to be marketed by Via as "Smart 5. Support" and seems to be an implementation of the "Universal Audio Jack" (UAJ). This makes it possible to drive a 5.1 surround sound system with out the need for an external decoder driven from a digital audio connection.
So, you have a small LCD character display, with a Hitachi HD44780 compatible controller and a PIC. You want to control the LCD display from the PIC. There seems to be quite a bit of sample code on the web, however, it seems to either have been written or an alternative microcontroller or in assembly. Well, here's a very basic library for writing to the controller from SDCC.
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.