Hedge Court Robots |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||
| HCR Home | Projects | Builder's Log | Links | Search | ||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||
![]() |
![]() |
|||||||||||||
|
Overboard
The name started out as Outboard, because the purpose is to provide human-sensable output to help debug circuits and microcontroller development. Once my imagination started going, I went overboard and kept thinking of more features and scope-creep was in full swing. Thus the name was changed from Outboard to Overboard. Overboard is a work in progress, and will have several iterations. Each version will help me gain experience with some microcontroller concepts or fabrication techniques. The current "production" (completed) version is v0.1 (which is the first one), and version v0.2 is in the early design stage. Someday, the vision for the configuration to include 8 LED indicators, an audio module with 8 built-in tones, and a 20x4 character LCD display. Communication with the Overboard is still being determined, as version v0.1 is a stand-alone board for me to practice doing schematics in Eagle and then fabricating PCBs. The instruction set is not developed yet, but will try to be simple for the LEDs and audio output, and I have no vision of how I want the LCD instructions to work yet (but will probably be built around a fixed display with various positions that bytes can be dropped into, like a mainframe green-screen form). v0.2Date: started on 24-Nov-2006, and still in progress. May sit for a bit because I'm working on Cubeulon first.
Pre-Construction Thoughts: This second iteration of Overboard is aimed at adding an EEPROM chip to store the music notes for the songs. At this initial point, I'm not sure what uC I'll use. I can use some public C libraries to bit bang the I2C connection to an EEPROM, but I think I'd like to use a chip that has hardware support for TWI. Also, I don't know how I'm going to write the data into the EEPROM. I'll have to investigate if avrdude and the AVRISP hardware can do it, or maybe the STK500 dev board. If not, then I'll have to build in the capability to write the EEPROM. For that, I'd probably want to have a serial connection to a PC, and some quick-n-dirty program on the PC that'll send serial bytes to the uC, and it'll then write that data to the EEPROM. I'll have to build some "mode" detection logic so the Overboard will know if it's in EEPROM writing mode, or normal music mode. And the ATtiny26 doesn't have UART support, so that serial connection would be bit-banged as well. Its looking like I've outgrown the tiny26. ATmega168 looks like it has the features I want, and it comes in a 28-pin DIP package, which isn't too much bigger than the 20-pin tiny26. v0.1Date completed: 23-Nov-2006 - Happy Thanksgiving! This is the first iteration of Overboard. When I sat down to think about the features I wanted in the final version of Overboard, I quickly came to the conclusion that I'd have to build up to that, taking baby steps along the way. This first step was intended simply to gain experience with creating musical notes with Pulse Width Modulation (PWM), using Eagle for schematic and board design, and fabricating PCB's in my basement. I had a side goal of ending up with a more useful ATtiny26 Dev board than my first one, but that sort of came into my mind later, after I decided to use my first dev board during software development for this one. When I started out, this first board was simplified in the following ways:
Overboard v0.1 Features:
The firmware I wrote is pretty simple, written with AtmanAVR C. To play music, populate an array with OC1C values which determine the frequency (note) to play. Populate another array with duration value for how long to hold the note. At first I had the durations stored as an array of integers, which hogged memory royally. To conserve RAM, I actually ended up packing the frequency value and the duration value into a single byte, with the stipulation that I would only support 32 notes and 8 durations (5 bits and 3 bits, respectively, fitting nicely into a single byte). The effect when I used up available memory in the main() function was fun. It would play normal notes until it hit an index in the array that was outside what the memory manager liked, and then it would randomly choose a value, so random notes would play for the durations I wanted the real notes to play for. Then I came up with the packing described above. |
|
![]() |
![]() |
||
| Hedge Court | HCR Home | Contact Us | Search | Copyright ©, HedgeCourt.com | ||
![]() |
![]() |