Yahoo Groups archive

AVR-Chat

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

Messages

Browse messages

Page 125 of 307 · 15341 messages matched

AVR Connection

2007-03-25 by Amir Hosseini

how to connect 2 AVR with out serial for Example : PORTD of AVR1 == Sending data PORTD of AVR2 == Resiving data if this example is corrected ?

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-25 by Ned Konz

I wrote: > So, using my headers, your example test for tx completed or empty could > be written: > [snip] > if (UCSR0B & ((1 /* do stuff */ > > > and the generated code would look like this: [snip] > or this (somewhat more efficient): > > > 15:test2.c *** if (UCSR0B & ((1 > 324 0

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-23 by Ned Konz

David Kelly wrote: > On Thu, Mar 22, 2007 at 08:44:08PM -0000, kernels_nz wrote: >> The huge advantage of using the shift and mask method is that it makes >> pre-written code completely portable to any other AVR micro with the >> same names for bits, and generally when two AVR mi

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-23 by David VanHorn

On 3/23/07, David Appleton wrote: > > I could get my hands on a scope..... this sounds a little scary. I would, if I were you. Depending on the scope, you can get a LOT of information. At one point, I was working on a battery charger, and I needed to know a bunch of parameters, b

Thread view Attachments: 0

Re: MEGA8 RS232

2007-03-23 by David Appleton

I could get my hands on a scope..... this sounds a little scary. [Non-text portions of this message have been removed]

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-23 by dlc

David Kelly wrote: > On Thu, Mar 22, 2007 at 09:28:01AM -0700, larry barello wrote: > >>One can define a struct for something like the USART peripheral and >>use bit fields. This has, in fact, been done for the GCC compiler. > > > BTDT. An inline mask usually results in smaller a

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-23 by David Kelly

On Thu, Mar 22, 2007 at 09:28:01AM -0700, larry barello wrote: > One can define a struct for something like the USART peripheral and > use bit fields. This has, in fact, been done for the GCC compiler. BTDT. An inline mask usually results in smaller and faster code. Also masks ar

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-23 by David Kelly

On Thu, Mar 22, 2007 at 08:44:08PM -0000, kernels_nz wrote: > > The huge advantage of using the shift and mask method is that it makes > pre-written code completely portable to any other AVR micro with the > same names for bits, and generally when two AVR micros have the same > p

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-22 by np np

I would never write code this way. I would always have everything named properly and once. Any places where numbers are entered could result in an error. ----- Original Message ---- From: kernels_nz To: AVR-Chat@yahoogroups.com Sent: Thursday, 22 March, 2007 8:44:08 PM Subject: [

Thread view Attachments: 0

Re: Some C help please !

2007-03-22 by kernels_nz

Hi Guys, I started this conversation, but after asking the initial question and getting a few replies, it has become glaringly obvious to me why (UCSRA &(1 wrote: > > Mike, > > What makes the former syntax nicer is that it has no "magic numbers" > embedded in the code. UCSRA.5 do

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-22 by Dennis Clark

Mike, What makes the former syntax nicer is that it has no "magic numbers" embedded in the code. UCSRA.5 does not mean as much as UCSRA.UDRE (if that is defined) or as UCSRA & (1 All this is fine. But for many of us hobbyists that know just enough about > C, especially when it co

Thread view Attachments: 0

RE: [AVR-Chat] Re: Some C help please !

2007-03-22 by larry barello

One can define a struct for something like the USART peripheral and use bit fields. This has, in fact, been done for the GCC compiler. Some folks use these definitions, but most stick with the shift & mask technique illustrated below as bit fields are un-portable (you may say, wh

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-22 by David VanHorn

> > > As a general rule its always bad to write loops with only one possible > exit. At the least you should provide a time out exit. Or enable the > watchdog timer and kick the dog once prior to entering the above loop. I've tried really hard to write my apps so that there is on

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-22 by David Kelly

On Thu, Mar 22, 2007 at 11:28:53AM -0400, Mike Bronosky wrote: > All this is fine. But for many of us hobbyists that know just enough > about C, especially when it comes to AVRs, to be > down-right-dangerous... > > For me something like the following, is good, proper and works. I

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-22 by Mike Bronosky

All this is fine. But for many of us hobbyists that know just enough about C, especially when it comes to AVRs, to be down-right-dangerous... For me something like the following, is good, proper and works. It is not fully understood until I dissect. while ((UCSRA & (1 wrote: > >

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-22 by David VanHorn

> > > My next goal is to read analog inputs. I also hope to [soon] be able to > talk to an LCD screen [I think I have found some good code and schematics > for this] and then I want to see what this I2C thing is all about. Haven't > played with stepper motors /PWM experiments yet

Thread view Attachments: 0

Re: MEGA8 RS232

2007-03-22 by David Appleton

Hi Guys, It was the fuse bits / oscillator settings. I used PonyProg [config and security bits window] to set it for the external oscillator. Thanks for your help. You guys are great... and I'm learning a lot. Lucky for me [Simple Boy] there was also an example online that was ex

Thread view Attachments: 0

Re: MEGA8 RS232

2007-03-21 by David Appleton

Thanks everyone. John, I looked at the micro today and saw that it is: ATMEGA-16PU [must be a newer part as you suspected] So it must be the CLK_DIV_8 bit. I'll try this. [Non-text portions of this message have been removed]

Thread view Attachments: 0

RE: [AVR-Chat] Re: MEGA8 RS232

2007-03-21 by Tim Mitchell

David Appleton wrote: > Thanks everyone. > > John, I looked at the micro today and saw that it is: > ATMEGA-16PU [must be a newer part as you suspected] > > So it must be the CLK_DIV_8 bit. > No, Mega16 does not have the CLKDIV8 bit. Mega88 and Mega168 have this. I would check yo

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-20 by John Clymer

You are using the Windows API for controlling the UART - these issues are taken care of for you. The serial driver code takes care of disabling, changing the baud, and re-enabling all with-in the DCB chaning API call (or the equivelant in Win32.) Many, many, many years ago, in a

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-20 by np np

I have never had trouble at the PC end changing baud rates. I used Delphi in my last project. So long as you make sure you were not in the middle of recieving something and flush the buffers then you should have no problems. www.ckp-railways.talktalk.net/pcbcad21.htm ----- Origin

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-20 by David VanHorn

> > > Also, not be an issue with the AVR's, but I know the PC uart's do NOT > like you changing the Baud Rate with the receivers / transmitters > enabled. I would move the Receiver / Transmitter enable to the end of > the init, rather than doing it first. You can change things on

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-20 by John Clymer

Is this a Mega8 or one of the newer Megax8 (x=4,8 or 16)? If you are using one of the newer parts, there is a CLK_DIV_8 bit in the clock control register. This could easily be the culprit. Also, not be an issue with the AVR's, but I know the PC uart's do NOT like you changing the

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-20 by David VanHorn

> > > Is it possible that the fuse bits for the clock are set up incorrectly? > e.g. The > AVR is running at 1 MHz instead of 8MHz. That or wrong prescaler setting on the uart. [Non-text portions of this message have been removed]

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-20 by Ralph Hilton

On Tue, 20 Mar 2007 09:44:53 -0700 (PDT) you wrote: >Hi Guys > > I got my Mega talking through the RS232 to a "terminal app" on my PC. > > Thing is when I "connect" I have to run the terminal app at 1200 BAUD. The Mega8 is coded at 9400 BAUD. > > Why is this this that I have to r

Thread view Attachments: 0

Re: [AVR-Chat] Re: MEGA8 RS232

2007-03-20 by Andreas Stemmer

David Appleton wrote: > Thing is when I "connect" I have to run the terminal app at 1200 BAUD. The Mega8 is coded at 9400 BAUD. 9600 Baud is 8 times 1200 Baud. First guess: Do you have F_CPU set correctly in your makefile? Second guess: Do you have an external crystal with 8MHz b

Thread view Attachments: 0

Re: MEGA8 RS232

2007-03-20 by David Appleton

Hi Guys I got my Mega talking through the RS232 to a "terminal app" on my PC. Thing is when I "connect" I have to run the terminal app at 1200 BAUD. The Mega8 is coded at 9400 BAUD. Why is this this that I have to run the terminal app at a lower baud? I attached the code that I u

Thread view Attachments: 0

Re: [AVR-Chat] checksum

2007-03-19 by Reza

--- Jim Wagner wrote: > Have you checked the exection of the "for" loop in > the > debugger? > > Jim > > > On 12 Mar 2007 22:10:47 -0700,Tue, 13 Mar 2007 > 05:10:11 > -0000 > "magzky02" wrote: > > i would like to get the sum of values of > characters in a > > string. I > > use to

Thread view Attachments: 0

Re: [AVR-Chat] AVR JTAGICE Flexible Cable Replacement

2007-03-14 by Russell Shaw

Ivan Vernot wrote: > Hello All, > > Has anyone managed to locate a source of Flexible Flat Cable used to connect the JTAG header to the Atmel JTAG ICE? > > Mine is now becoming intermittent and it seems the only alternative from Atmel is to buy a whole new ICE! > > Any pointers t

Thread view Attachments: 0

Re: Some C help please !

2007-03-14 by David Appleton

I am going to learn so much from this group...... Glad I joined. : ) [Non-text portions of this message have been removed]

Thread view Attachments: 0

RE: [AVR-Chat] AVR JTAGICE Flexible Cable Replacement

2007-03-14 by larry barello

I took a length of 10 conductor IDC cable and soldered it directly to my ICE board... Cheesy, but more durable than the FRC at the business end. -----Original Message----- From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf Of Ivan Vernot Sent: Tuesday, Mar

Thread view Attachments: 0

Re: [AVR-Chat] AVR JTAGICE Flexible Cable Replacement

2007-03-14 by Ivan Vernot

Thanks Don, I looked at Farnell but closest match was Farnell PN 3295047 This has the right number of connections and pitch but the conductiuve 'fingers' are on the same side of the cable - whereas they are on the top and bottom on the JTAG cable. I will try Newark as well - now

Thread view Attachments: 0

Re: [AVR-Chat] AVR JTAGICE Flexible Cable Replacement

2007-03-14 by David VanHorn

On 3/13/07, Ivan Vernot wrote: > > > Thanks David, > Are you saying that you bought the cable plus the adaptor PCB or is it > possible to just buy the cable by itself? The cable and the adaptor together as a set. We only wanted the cable, but it wasn't an option. [Non-text portio

Thread view Attachments: 0

Re: [AVR-Chat] AVR JTAGICE Flexible Cable Replacement

2007-03-14 by Ivan Vernot

Thanks David, Are you saying that you bought the cable plus the adaptor PCB or is it possible to just buy the cable by itself? Thanks Again - I'll check it out.. Ivan Vernot On 14/03/2007 12:53:06 PM, David VanHorn (microbrix@gmail.com) wrote: > On 3/13/07, Ivan Vernot wrote: > >

Thread view Attachments: 0

Re: [AVR-Chat] AVR JTAGICE Flexible Cable Replacement

2007-03-14 by Don Ingram

Ivan Vernot wrote: > Hello All, > > Has anyone managed to locate a source of Flexible Flat Cable used to connect the JTAG header to the Atmel JTAG ICE? > > Mine is now becoming intermittent and it seems the only alternative from Atmel is to buy a whole new ICE! > > Any pointers t

Thread view Attachments: 0

Re: [AVR-Chat] AVR JTAGICE Flexible Cable Replacement

2007-03-14 by David VanHorn

On 3/13/07, Ivan Vernot wrote: > > Hello All, > > Has anyone managed to locate a source of Flexible Flat Cable used to > connect the JTAG header to the Atmel JTAG ICE? I have a spare, If I remember right we got them, with the little board on the end, from digikey. -- Jealousy is

Thread view Attachments: 0

AVR JTAGICE Flexible Cable Replacement

2007-03-14 by Ivan Vernot

Hello All, Has anyone managed to locate a source of Flexible Flat Cable used to connect the JTAG header to the Atmel JTAG ICE? Mine is now becoming intermittent and it seems the only alternative from Atmel is to buy a whole new ICE! Any pointers to suppliers and/or cable specs wo

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-13 by Dave Hylands

Hi Hein, > Thanks for the quick response, I understand what the code does, just > not why a bitwise AND is performed and what (1 baby-C, I would probably have written > > while (UCSRA.x != 0); > > where x is the UDRE bit. Any advantages to the way it's done below ? Bitfields aren

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-13 by Dennis Clark

See below: kernels_nz wrote: > Hi Alex, > > Thanks for the quick response, I understand what the code does, just > not why a bitwise AND is performed and what (1 baby-C, I would probably have written > > while (UCSRA.x != 0); Which is perfectly fine if UCSRA is defined to work th

Thread view Attachments: 0

Re: [AVR-Chat] Some C help please !

2007-03-13 by Ivan Vernot

Hein, The line while ((UCSRA & (1 To: Sent: Wednesday, March 14, 2007 8:52 AM Subject: [AVR-Chat] Some C help please ! > Hi guys, Ive been programming in C for a while now, but my C tends to > be "baby C", in that I probably don't write things as simple as they > can be written.

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-13 by David VanHorn

> > > Which is perfectly fine if UCSRA is defined to work that way. I > often define structs for SFRs so that I'd do something like: > > while (UCSRAbits.UDRE != 0) This certainly is a lot easier to read. I try to avoid reversed inversions of negative logic inverted. I would also

Thread view Attachments: 0

RE: [AVR-Chat] Re: Some C help please !

2007-03-13 by Alex Shepherd

> Thanks for the quick response, I understand what the code > does, just not why a bit wise AND is performed and what > (1 while (UCSRA.x != 0); > > where x is the UDRE bit. Any advantages to the way it's done below ? Well, I think some other compilers may do this sort of thing a

Thread view Attachments: 0

Re: [AVR-Chat] Re: Some C help please !

2007-03-13 by np np

> is a shift right www.ckp-railways.talktalk.net/pcbcad21.htm kernels_nz wrote: Hi Alex, Thanks for the quick response, I understand what the code does, just not why a bitwise AND is performed and what (1 wrote: > > > while ((UCSRA & (1 > Loop around checking the state of the UDR

Thread view Attachments: 0

Re: Some C help please !

2007-03-13 by kernels_nz

Awesome, thanks for the responses, makes perfect sense now, never occurred to me that 1 wrote: > > Hein, > The line while ((UCSRA & (1 > Somewhere in you compilers include files there will be a definition like > #define UDRE 5 > thus 1 > You should know that 1 = 0000 0001 > 1 > s

Thread view Attachments: 0

Re: Some C help please !

2007-03-13 by kernels_nz

Hi Alex, Thanks for the quick response, I understand what the code does, just not why a bitwise AND is performed and what (1 wrote: > > > while ((UCSRA & (1 > Loop around checking the state of the UDRE bit in the UCSRA port until the > bit value is NOT 0 >

Thread view Attachments: 0

Some C help please !

2007-03-13 by kernels_nz

Hi guys, Ive been programming in C for a while now, but my C tends to be "baby C", in that I probably don't write things as simple as they can be written. . . Could someone please explain the entire purpose of the following line, particularly the 1

Thread view Attachments: 0

Re: [AVR-Chat] project in Melbourne AUS

2007-03-13 by BobGardner@aol.com

If your company opens an office in Orlando Florida, send an email -----Original Message----- From: mtubb@airship.com.au To: AVR-Chat@yahoogroups.com Sent: Tue, 13 Mar 2007 3:13 AM Subject: [AVR-Chat] project in Melbourne AUS Hello all, I am looking for an experienced programmer/d

Thread view Attachments: 0

Re: [AVR-Chat] checksum

2007-03-13 by David Kelly

On Tue, Mar 13, 2007 at 02:30:40AM -0700, mago Umandam wrote: > Good you mention about CRC. for now, i just get the sum and 2's > compliment. But i look forward on doing CRC in the future. never did > that yet :) It may be easier to CRC as IIRC there is a CRC in avr-libc. Be warn

Thread view Attachments: 0

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.