I only came across this site recently, and it’s like Christmas - all those electronics! Wow!
So I want to get back into playing with uCs, and I really like the USB Weather Board. But I want to make some changes, like add data logging in addition to BT, and a few other things.
My main concern is being able to change the program on the chip without the need for a programmer. I don’t have a computer with a serial port, and I would prefer not to have to shell out for a programmer in any case. So I’m wondering if it would be possible to flash the Arduino boot loader onto the chip by using the existing UART pins, and perhaps manually pulling some pins to GND or whatever. Is that possible? It doesn’t matter if it’s a hack, I’ll only need to do that once (hopefully) and then I’ll just treat it like an Arduino.
Has anybody tried that? Any reasons why it should/should not work?
check out avrfreaks.net as well.
AVR microprocessors and most other support “in-system-programming” or ISP. Sometimes called “ICSP” (in-circuit-).
There are two ways to do this:
- The PC board will have a “JTAG” connector. You connect to this a JTAG device which can be simple or sophisticated. As cheap as $18 as a kit or hundreds of dollars. With AVRs, it best to choose one that’s from Atmel or a compatible one so it is inherently supported by the free Atmel Studio software development tools - assembly language and an integrated version of public domain GCC “WinAVR”. Here’s a cheap JTAG (clone of the original Atmel one - supported by AVR Studio):
http://www.nkcelectronics.com/avr-jtag- … r-kit.html
(with apologies to SFE). There are lots of JTAGs availble.
- Use a “Bootloader”. This is a program that is ever-present in the flash memory of the microprocessor (excluding the ones with very small memory). The bootloader can run at power-up/reset and check for incoming code on the UART/serial port or USB-to-serial adapter - which would be connected to a PC. There are lots of free bootloaders (see avrfreaks.net in the Projects Section - e.g., “BLIPS”). Catch-22 is that you need to configure and install the bootloader once using an ISP device. Or have a friend do so. Or buy an AVR chip with a pre-installed bootloader (such priio.com or Arduino or others).
Some bootloaders, such as BLIPS (I’m the author and it’s freeware, both the PC side and the AVR side) - allow the PC to connect via IP on a LAN or the internet to one of the many ethernet-to-serial converters. And download new code remotely.
And some AVR boards have ethernet integral, and you can download via ethernet.
Hope that gives you a good overview.
Thanks for the pointers! I know how this works in principle, I was just wondering if it would be possible to do this “by hand.” But I’ve ordered an Arduino USB board and a couple of other stuff to play around with. I should be able to build a programmer for the Weather board with that.
I actually did something similar about 10 years ago with whatever current generation Atmels there were at the time. I remember this being surprisingly easy to get to work.