Yahoo Groups archive

AVR-Chat

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

Message

Serial to EEPROM on Atmega8, reconfigure back into outputs

2006-06-04 by Erich Ludwig

Hi Ryan,
no problem to change data direction of ports during run, easy with BASCOM. You can use the CONFIG PORT statement not only in the header of a program. I already had to switch data direction during run because of many lines talking to one single input where always only one sender was set to OUTPUT. That was easy with BASCOM.
Erich
----- Original Message -----
From: Ryan
Sent: Sunday, June 04, 2006 4:58 PM
Subject: [AVR-Chat] Re: serial to EEPROM on Atmega8?

Thanks for the reply. So it sounds like what I would want to do is
create a startup loop that checks the RS232 for characters, and when
it receives them, have it stuff the needed ones into EEPROM. ; Do I
need to worry about things like checksums for the data? I really am a
newbie when it comes to RS232. I don't want the EEPROM getting
garbage and blowing things up.

Secondly, after everything gets updated, can I reconfigure the PD0 and
PD1 (rxd and txd) back into outputs? I'm not sure if they can be
changed on-the-fly in the middle of a program.

I'm currently working with bascom for my sanity... Grew up with
basic, so it's almost like a comfort food. :)

Ryan

--- In AVR-Chat@yahoogroups.com, Ned Konz wrote:
> Not directly, but your program can receive characters and program the
> EEPROM. One trick from the bootloaders is to only receive these
> configuration commands within (say) the first 2 seconds, and to also
> have some way to uniquely identify these commands.




Attachments

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.