Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

sending code to a chip - Palm and bootloaders

sending code to a chip - Palm and bootloaders

2004-06-26 by Dave Mucha

Hi all,

This is my first post here an I've enjoyed reading some of the 
archives.

I am in search of a microcontroller for some different projects I 
want to do and I am hoping someone can offer some ideas or set me 
straight.

I would like to make a greenhouse timer and be able to program 
variables to it from a PALM PILOT or other cheap hand held device.

Different cycles and start and stop times are really all that would 
be passed.

I also have been trying to find data on bootloaders.   As I 
understand, they offer the ability to program in your lab, then put 
into the field, and then without a programmer, upload a new program.  
Of course they take some memory so are not the cure all.

does anybody have any experiance with PALM's and AVR's and/or 
bootloaders ?

Dave

Re: [AVR-Chat] sending code to a chip - Palm and bootloaders

2004-06-26 by David VanHorn

>
>does anybody have any experiance with PALM's and AVR's and/or 
>bootloaders ?

Sure, but why do you need a bootloader?
All you need is to change some parameters.

Write the control section to work from variables stored in EEPROM.
On first boot, write some default values to EE.
Then you'll need a section that talks through the UART to the Palm, to a program you've written there (NSBasic is pretty easy) that accepts and stores new values for the variables.

Re: sending code to a chip - Palm and bootloaders

2004-06-26 by Dave Mucha

--- In AVR-Chat@yahoogroups.com, David VanHorn <dvanhorn@c...> wrote:
> 
> >
> >does anybody have any experiance with PALM's and AVR's and/or 
> >bootloaders ?
> 
> Sure, but why do you need a bootloader?
> All you need is to change some parameters.
> 
> Write the control section to work from variables stored in EEPROM.
> On first boot, write some default values to EE.
> Then you'll need a section that talks through the UART to the Palm, 
to a program you've written there (NSBasic is pretty easy) that 
accepts and stores new values for the variables.

I have a program that I want to try out for my brother in Florida.  
I'm in NJ. : )  he has the PALM and the collage he is in has a 
greenhouse that he is taking care of.

I figured that with a bootloader, I can write a new program if needed 
and e-mail it to him.  

Since he is working with plants, he has no electronical stuff.

I was figuring a bootloader would let him send a new program without 
a programmer.

But, the weekly changes would be changing variables like time ON for 
sprinklers and duration of run times.

Dave

Re: [AVR-Chat] Re: sending code to a chip - Palm and bootloaders

2004-06-26 by Dave VanHorn

>
>I have a program that I want to try out for my brother in Florida.
>I'm in NJ. : )  he has the PALM and the collage he is in has a
>greenhouse that he is taking care of.
>
>I figured that with a bootloader, I can write a new program if needed
>and e-mail it to him.
>
>Since he is working with plants, he has no electronical stuff.
>
>I was figuring a bootloader would let him send a new program without
>a programmer.
>
>But, the weekly changes would be changing variables like time ON for
>sprinklers and duration of run times.

I see..  An AVRISP could be used, if you could write NSB code to drive it.
I'll warn you of this though, there's no way to send $FF to the serial port 
in NSBasic.
Originally there was no way to send a null, because he uses null terminated 
strings.
So, he "fixed" it by translating FF to 00...
AARRRRGGGHHH..

Now we just convert FE to FF, and FD to FE, and....

Re: [AVR-Chat] Re: sending code to a chip - Palm and bootloaders

2004-06-26 by erikc

OK, I'm going to say something that may appear stupid, so
bear with me.

My interpretation of the problem is that "Florida" will be
merely using the AVR in an appliance that controls
greenhouse watering, etc. and that he will be entering
values on a keyboard or something like that toset times,
etc.,, and that "New Jersey" is wanting to send firmware
upgrades from time to time.

If that is the case, why not send, via snail mail, a
programmed part "Florida" can install in his appliance?
(The applicance has a socket for the chip)  The old part can
then be sent back to "New Jersey" for reuse.

Erikc  - firewevr@airmail.net
///
"An Fhirinne in aghaidh an tSaoil."
"The Truth against the World."
        -- Bardic Motto
///I did NOT lose my mind!  It's backed up on the server
(and the network's down....)


----- Original Message -----
From: "Dave VanHorn" <dvanhorn@cedar.net>
To: <AVR-Chat@yahoogroups.com>; <AVR-Chat@yahoogroups.com>
Sent: Saturday, June 26, 2004 21:46
Subject: Re: [AVR-Chat] Re: sending code to a chip - Palm
and bootloaders


>
> >
> >
> >Seems like there was a similar case with the KISS
firmware for TNCs.
> >I seem to recall there was an escape sequence for certain
characters.
>
> Yeah, you'd have to do that here, or send the hex as
ascii, $AB as $41,
> $42  and so on.
>
>
>
> ------------------------ Yahoo! Groups
Sponsor --------------------~-->
> Yahoo! Domains - Claim yours for only $14.70
> http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dN_tlB/TM
> ----------------------------------------------------------
----------~->
Show quoted textHide quoted text
>
>
> Yahoo! Groups Links
>
>
>
>
>

Re: [AVR-Chat] Re: sending code to a chip - Palm and bootloaders

2004-06-26 by Mike Murphree

On Jun 26, 2004, at 2:09 PM, Dave VanHorn wrote:
>
> I see..  An AVRISP could be used, if you could write NSB code to drive 
> it.
> I'll warn you of this though, there's no way to send $FF to the serial 
> port
> in NSBasic.
> Originally there was no way to send a null, because he uses null 
> terminated
> strings.
> So, he "fixed" it by translating FF to 00...
> AARRRRGGGHHH..
>
> Now we just convert FE to FF, and FD to FE, and....

Seems like there was a similar case with the KISS firmware for TNCs.
I seem to recall there was an escape sequence for certain characters.

Mike

Re: [AVR-Chat] Re: sending code to a chip - Palm and bootloaders

2004-06-26 by Dave VanHorn

>
>
>Seems like there was a similar case with the KISS firmware for TNCs.
>I seem to recall there was an escape sequence for certain characters.

Yeah, you'd have to do that here, or send the hex as ascii, $AB as $41, 
$42  and so on.

Re: [AVR-Chat] Re: sending code to a chip - Palm and bootloaders

2004-06-26 by Dave VanHorn

>
>If that is the case, why not send, via snail mail, a
>programmed part "Florida" can install in his appliance?
>(The applicance has a socket for the chip)  The old part can
>then be sent back to "New Jersey" for reuse.

Outside the box thinking, but I think they are looking for a more frequent 
update rate :)

Re: sending code to a chip - Palm and bootloaders

2004-06-27 by Dave Mucha

--- In AVR-Chat@yahoogroups.com, Dave VanHorn <dvanhorn@c...> wrote:
> 
> >
> >If that is the case, why not send, via snail mail, a
> >programmed part "Florida" can install in his appliance?
> >(The applicance has a socket for the chip)  The old part can
> >then be sent back to "New Jersey" for reuse.
> 
> Outside the box thinking, but I think they are looking for a more 
frequent 
> update rate :)


I thought about that also.

I'm not excited about a plant specialist swapping chips. : (

IF the palm is the problem, there is no reason the unit cannot be 
brought back to a *REAL* pc with a real serial port and use that.

So far, we are looking at some temperature sensors, moisture meters 
and some solenoid outputs.

I could make a small logic card and a larger field termination board 
so they can plug the two together or unplug as needed.

um... I have an old hard drive holder that allowed me to swap hard 
drives.  has a lot of connectors on it....   use and old PC case for 
the screw terminals and such...


kinda like this...  http://www.bpcomp.com/rack.html

wadda-ya-think ?

Dave

Re: [AVR-Chat] Re: sending code to a chip - Palm and bootloaders

2004-06-27 by Brian Dean

On Sat, Jun 26, 2004 at 05:48:17PM -0000, Dave Mucha wrote:

> I have a program that I want to try out for my brother in Florida. 
> I'm in NJ. : )  he has the PALM and the collage he is in has a
> greenhouse that he is taking care of.
> 
> I figured that with a bootloader, I can write a new program if needed
> and e-mail it to him. 

See Jason Kyle's STK500Boot program:

     http://www.avr1.org/stk500boot/stk500boot.html

It makes your AVR target look like a regular old STK500, thus you can
use the serial port of your PC and your favorite programming software
(I'm partial to AVRDUDE, of course :-)) to program your target board.
Just tell your programming software that it is programming a chip in
an STK500.

On the target device, one of the I/O lines is used to indicate that it
should enter programming mode.  Normally one would attach a switch to
that pin and press it while the AVR boots up.  It checks the switch
and if it is pressed, then it enters the bootloader code and waits for
STK500 commands from the PC.  If it is not pressed, it runs the
application as normal.

I've used it - works nice.  I needed to make some minor updates to
make it work with later versions of AVR-GCC, but those were pretty
minor.

Good luck!

-Brian
-- 
Brian Dean
http://www.bdmicro.com/

Re: [AVR-Chat] Re: sending code to a chip - Palm and bootloaders

2004-06-27 by erikc

The drawer and nest combination is an excellent idea, IMO.

Erikc  - firewevr@airmail.net
///
"An Fhirinne in aghaidh an tSaoil."
"The Truth against the World."
        -- Bardic Motto
///I did NOT lose my mind!  It's backed up on the server
(and the network's down....)


----- Original Message -----
From: "Dave Mucha" <dave_mucha@yahoo.com>
To: <AVR-Chat@yahoogroups.com>
Sent: Sunday, June 27, 2004 04:08
Subject: [AVR-Chat] Re: sending code to a chip - Palm and
bootloaders


> --- In AVR-Chat@yahoogroups.com, Dave VanHorn
<dvanhorn@c...> wrote:
> >
> > >
> > >If that is the case, why not send, via snail mail, a
> > >programmed part "Florida" can install in his appliance?
> > >(The applicance has a socket for the chip)  The old
part can
> > >then be sent back to "New Jersey" for reuse.
> >
> > Outside the box thinking, but I think they are looking
for a more
> frequent
> > update rate :)
>
>
> I thought about that also.
>
> I'm not excited about a plant specialist swapping chips. :
(
>
> IF the palm is the problem, there is no reason the unit
cannot be
> brought back to a *REAL* pc with a real serial port and
use that.
>
> So far, we are looking at some temperature sensors,
moisture meters
> and some solenoid outputs.
>
> I could make a small logic card and a larger field
termination board
> so they can plug the two together or unplug as needed.
>
> um... I have an old hard drive holder that allowed me to
swap hard
> drives.  has a lot of connectors on it....   use and old
PC case for
> the screw terminals and such...
>
>
> kinda like this...  http://www.bpcomp.com/rack.html
>
> wadda-ya-think ?
>
> Dave
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups
Sponsor --------------------~-->
> Make a clean sweep of pop-up ads. Yahoo! Companion
Toolbar.
> Now with Pop-Up Blocker. Get it for free!
> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dN_tlB/TM
> ----------------------------------------------------------
----------~->
Show quoted textHide quoted text
>
>
> Yahoo! Groups Links
>
>
>
>
>

Re: sending code to a chip - Palm and bootloaders

2004-06-29 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "Dave Mucha" <dave_mucha@y...> wrote:

> does anybody have any experiance
> with PALM's and AVR's and/or 
> bootloaders ?

How about basing the controller on the AVR Butterfly? That comes with 
a bootloader that is compatible with AVR Prog, which is free from 
Atmel.  The Butterfly has a serial port.  You would hook that up to 
the PC to update the firmware and to the PALM to update parameters.  
You get a seven-digit display, which I'm sure would be useful (if 
nothing else, to show the time), a cute little joystick and a light 
sensor all for $20.00. There is a JTAG-ICE port, which is great for 
development and debugging.

A downside is the Butterfly is a bit short on GPIO, but a port 
extender would solve that.

I have a project (somewhat on hold) to produce a "carrier card" for 
the Butterfly that turns it into a more general purpose development 
platform. It has an external power supply, DB9 for the serial port, 
brings the JTAG-ICE and ISP to upward-facing headers at the back and 
GPIO to a prototyping area at the front. I also have in development a 
JTAG-ICE clone that would sell at around $40.  I could post a photo 
of the two working together. If this sounds interesting, I'm looking 
for an early-adopter to flush out any wrinkles.

Graham.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.