Well .. I haven’t updated the blog in a while as I did not have any updates to share at the time. Since my last posting, I have placed a rather large order with DigiKey which has allowed me to forge ahead with my micro-controller & FT857D project.
One of the recent acquisitions I have made was to purchase a USBASP ICSP programmer which will allow me to program AVR micro-controllers without having to either DIP-swap chips on my Arduino, or (temporarily) re-purpose my Arduino as an ICSP programmer (which actually works quite nicely btw).
I picked up a handful of ATtiny85 micro-controllers which cost a mere $1.37 each. These little gems have 8kB of program space and boast 6 io pins (which can be re-purposed in software) whose functions include:
- 3 analog ADC pins (also can be digital IO) [pins 2,3,7]
- 2 PWM outputs [pins 5&6]
- reset [pin 1]
My intention for the automatic control of ALC of a Yaesu FT-857D radio requires four pins which in my current prototype layout are:
- pin 1 = (future)
- pins 2&3 = software emulated I²C UART for control of a DAC
- pin 4 = GND (from radio’s MIC port)
- pins 5&6 = software emulated serial UART for the FT857D CAT control functions
- pin 7 = “analog input 1” = analog input from front panel (MTR jack)
- pin 8 = Vcc (from radio’s MIC port)
I was originally planning on using an ATMega328(or similar) micro-controller which boasts a much larger compliment of (23 io) pins and program space, however, I decided to try a minimalist approach. After all of the code-space requirements, I should have a few bits left over for unforeseen additions. If I have a PCB board fabbed for my project, I imagine that I would be able to install my ALC control module inside of the radio’s chassis!
In addition to the micro-controllers I ordered, I also grabbed some op-amps, negative voltage regulators, a few DACs and a bunch of other goodies. I’m certainly set for a while now!
On a software side, the ATtiny85 provides a large number of challenges. For starters, I had a chicken-or-egg problem of having to update my USBASP programmer’s firmware which required me to repurpose my Arduino as an ICSP programmer and effectively bit-bang the new firmware onto the programmer using AVRDude. The command I issued was:
avrdude -c stk500v1 -b 19200 -P com6 -p atmega8 -U hfuse:w:0xc9:m -U lfuse:w:0xef:m -U flash:w:usbasp.atmega8.2011-05-28.hex:i -v
Along with having to re-flash the programmer, if you wish to use the Arduino development suite, you have to download the latest WinAVR files and replace the Arduino files with the updates. Part of this process requires editing of the avrdude.conf file to tweak some values. I’ve uploaded my config file to save those who are foolish enough to follow in my footsteps some grief. Simply download the conf file to:
C:Program Files (x86)arduino-1.0.1hardwaretoolsavretc
After the development suite hacks were done, I was able to load my FT857D test code and successfully control the radio with the ATtiny85. I’ve started coding the ALC threshold routine, and will test connectivity with my I²C DAC chip soon enough. For now, I’m glad to finally be started on this project.
In other news, a replacement PIC controller arrived for my TNC-X which solved my issue of not being able to trigger the PTT of the radio. The only problem I see now is all kinds of garbage text in the decoded packets coming in. I am not sure what the root cause is, so it looks like more tinkering for me!
On a slightly related note, I intend to look at the Raspberry Pi again – I’ve been busy in the Linux world doing other things, so this has been back-benched a little for now. I’ve still got to look at the resource management to see if I can get the software decoding of AX.25 (packet radio) frames working. If this works out, we could have a fantastic TNC/digipeater for in around the $60 mark with FAR, FAR, FAR more functionality than anything on the market today.
Once I get a bit more headway on my current project, I’ll be tackling the RasPi-peater project.