Back in February, [ProtoStack] posted a pretty good tutorial on how to do Analogue to Digital Conversion on an Atmega168. Based on a bread board, the tutorial also shows the often forgotten low pass filter on the AVCC lines to ensure an extra stable reference and an analog input connection to a simple voltage divider as a study point.
Moving on into the micro controller, the registers you’re going to need to twiddle are laid out and explained in detail. Finally you’re shown how to put it all together in a software project that outputs the analog reading onto a standard character LCD.
But hold on! There is more. Just released is a follow up to that tutorial which adds on Analogue to Digital Conversion Interrupts on an Atmega168A. So if you’re sitting there looking at an Arduino and want to know more about what’s going on under the hood, these are a good place to start.
This handy printer interface started out as a request on our very own forums when forum member [victorf] needed some output via thermal printers. He had scored a number of HP82240B thermal printers intended for use with HP calculators, but of course they used the somewhat arcane HP protocol first drafted in the 1960′s and needed some help.
Fellow forum member [wireb] started to look into it, found out it uses a standard 32KHz carrier signal, and started asking questions about its use. Grabbing a pdf of the manual he was able to find out all the details to what the printer was expecting in the form of communications.
After a few weeks, [wireb] was able to make a convenient, logic level serial to HP-IR adapter based around a PIC16F1824 who’s firmware supports 9600 8N1 or 2400 8N1 speeds, ASCII text, and the printer’s “advanced” graphical modes via escape sequences.
If you have not checked out our forums yet we suggest you do!