Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART

Ads

Discussion Groups

Discussion Groups | AVRclub | Re: [AVR club] help please

Atmel AVR Microcontroller discussion group.

help please - Somashekar S.M. - May 5 9:23:00 2005


hello Friends,

I am newly useing ATmaga32 to my project and i use to write in C language , I had instaled AVR studio and i don't know how to start . can send any sample small project file for ATmaga32 is great halpful for me to learn AVR. Dave VanHorn <dvanhorn@dvan...> wrote:
At 06:10 AM 4/15/2005, pruchj1 wrote: >Hi!
>Donīt you have someone C code, which implement simple protocol on
>UART? Iīve Atmega128. I want to be sure, that recieve data are ok,
>without mistakes. For example checksum after recieving message...
>Thank you! Well, both sides of the conversation need to be speaking the same protocol.

One of the simplest is Xmodem, which implements a checksum of the data.
In an xmodem packet, you send the block number,
the complement of the block number, 128 data bytes, then the checksum.
The checksum is simply the result of adding all
the data into an 8 bit register, and throwing
away the carries. (modulus 8 addition)
If you get an errored packet, you send an ASCII
NAK in response, and the host sends the packet again.
If you get a good packet, you send an ASCII ACK,
and the host sends the next packet.

At the higher level, too many errors in a row
causes you to abort the transfer, by sending multiple ^X chars.
Something you should be aware of though, this
group is pretty much abandoned, and we are all over at AVR-Chat. ---------------------------------
Yahoo! Groups Links

To Yahoo! India Matrimony: Find your life partneronline.

[Non-text portions of this message have been removed]




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )


Re: [AVR club] help please - Zack Widup - May 5 9:48:00 2005

What are you using for a programmer?

The STK-500 comes with a programmed chip in the appropriate socket which
runs a small program to flash the LED's on the board. The program is in
the manual and, I believe, also in software on the CD-ROM that comes with
the STK500. You can play around and change it and watch the effects on
the STK500 board. I did this while I was learning at first.

I have some small assembly-lanuguage programs you could try. Most use the
mega8 or mega16. One of them uses the UART on an ATMega8 for an RS-232
connection. You could probably modify it to work on a mega32.

Come to think of it, you could probably find some small programs at the
Atmel or AVRFreaks website, too, in both assembler and C. I mostly use
assembler when programming.

Zack On Thu, 5 May 2005, Somashekar S.M. wrote: > hello Friends,
>
> I am newly useing ATmaga32 to my project and i use to write in C
> language , I had instaled AVR studio and i don't know how to start . can
> send any sample small project file for ATmaga32 is great halpful for me
> to learn AVR.




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

RE: [AVR club] help please - stevech - May 6 0:05:00 2005

Suggestion: Write in C not assembler, with these chips with larger memories.
Get COdevisionAVR's freeware starter version. Use some of the examples to
learn. If you don't know C, get an intro text at the bookstore. Avoid the
BASIC dialects for AVR/PIC, since they are OK for hobby stuff but they are
not a standard language.

If you want to learn assembly language, make sure your goal is to target a
really primitive chip - like the smallest flash memory AVRs. I've even
written sophisticated programs in C in tiny memory model mode for the small
90S2313 which has only 2K bytes of Flash.

IMO

-----Original Message-----
From: avrclub@avrc... [mailto:avrclub@avrc...] On Behalf Of
Somashekar S.M.
Sent: Thursday, May 05, 2005 6:24 AM
To: avrclub@avrc...
Subject: [AVR club] help please hello Friends,

I am newly useing ATmaga32 to my project and i use to write in C
language , I had instaled AVR studio and i don't know how to start . can
send any sample small project file for ATmaga32 is great halpful for me to
learn AVR. Dave VanHorn <dvanhorn@dvan...> wrote:
At 06:10 AM 4/15/2005, pruchj1 wrote: >Hi!
>Donīt you have someone C code, which implement simple protocol on
>UART? Iīve Atmega128. I want to be sure, that recieve data are ok,
>without mistakes. For example checksum after recieving message...
>Thank you! Well, both sides of the conversation need to be speaking the same protocol.

One of the simplest is Xmodem, which implements a checksum of the data.
In an xmodem packet, you send the block number,
the complement of the block number, 128 data bytes, then the checksum.
The checksum is simply the result of adding all
the data into an 8 bit register, and throwing
away the carries. (modulus 8 addition)
If you get an errored packet, you send an ASCII
NAK in response, and the host sends the packet again.
If you get a good packet, you send an ASCII ACK,
and the host sends the next packet.

At the higher level, too many errors in a row
causes you to abort the transfer, by sending multiple ^X chars.
Something you should be aware of though, this
group is pretty much abandoned, and we are all over at AVR-Chat. ---------------------------------
Yahoo! Groups Links

To Yahoo! India Matrimony: Find your life partneronline.

[Non-text portions of this message have been removed]

Yahoo! Groups Links




(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )