Yahoo Groups archive

AVR-Chat

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

Thread

AVR BootLoader

AVR BootLoader

2004-12-25 by nayoo1979

Hi all,

I am trying to implement an ATMega8 bootloader. If anybody has 
happened to got the experiences before, pls share with me. 

I will be very grateful to you, if any of you can kindly share with 
me any of the below:
1. where to find the useful information online
2. where to find the sample source codes.
3. Any Experiences in implementing bootloader
4. How to download the Bootloader

Thank you
Nay Oo

Re: [AVR-Chat] AVR BootLoader

2004-12-25 by Henry Carl Ott

Normally I'd say try www.avrfreaks.com, but the site is down at the moment.
  You can try the site in a couple of days and see if they can get back up.

  I do have a modified atmel app note boot loader for the mega8 on my 
projects page.
  http://users.rcn.com/carlott/

  It's reasonably small, written in assembler, uses the atmel avrprog.exe 
program to download code.


Hope that helps a little,

-carl



At 07:56 AM 12/25/2004, you wrote:
Show quoted textHide quoted text
>Hi all,
>
>I am trying to implement an ATMega8 bootloader. If anybody has
>happened to got the experiences before, pls share with me.
>
>I will be very grateful to you, if any of you can kindly share with
>me any of the below:
>1. where to find the useful information online
>2. where to find the sample source codes.
>3. Any Experiences in implementing bootloader
>4. How to download the Bootloader
>
>Thank you
>Nay Oo
>
>

Re: [AVR-Chat] AVR BootLoader

2004-12-25 by Dave VanHorn

At 07:56 AM 12/25/2004, nayoo1979 wrote:



>Hi all,
>
>I am trying to implement an ATMega8 bootloader. If anybody has
>happened to got the experiences before, pls share with me.
>
>I will be very grateful to you, if any of you can kindly share with
>me any of the below:
>1. where to find the useful information online
>2. where to find the sample source codes.
>3. Any Experiences in implementing bootloader
>4. How to download the Bootloader

Well, you should chat with the other fellow, you are both trying to do the 
same thing.

Read the atmel app notes.

Usually, you implement the boot loader through a USART interface, but that 
isn't required. It's just the most conventional way.  You have it try to 
connect with a PC at boot, and if it can't connect within a reasonable time 
(10 seconds?) then you allow the main program to run.

Nothing prevents you from doing a loader mechanism inside the main program 
either, but that is a more advanced project, and much more "delicate".  The 
nice thing about the boot block is that you can protect it so that the boot 
loader can't destroy itself accidentally.  So, even if the main program is 
totally erased, the boot loader still works.

Re: [AVR-Chat] AVR BootLoader

2004-12-25 by Nay Oo

Hi Carl,
Thank you for your short and helpful informations.
I have one question:
"After I download the bootloader, how can I download the Application Codes without using STK500?"
Do I need to write an window application software or can I still use AVRProg.exe or AVRStudio.exe to download Application Codes after that without using programmer?"
Best Regards,
Nay Oo

Henry Carl Ott wrote:
Show quoted textHide quoted text
Normally I'd say try www.avrfreaks.com, but the site is down at the moment.
You can try the site in a couple of days and see if they can get back up.

I do have a modified atmel app note boot loader for the mega8 on my
projects page.
http://users.rcn.com/carlott/

It's reasonably small, written in assembler, uses the atmel avrprog.exe
program to download code.


Hope that helps a little,

-carl



At 07:56 AM 12/25/2004, you wrote:


>Hi all,
>
>I am trying to implement an ATMega8 bootloader. If anybody has
>happened to got the experiences before, pls share with me.
>
>I will be very grateful to you, if any of you can kindly share with
>me any of the below:
>1. where to find the useful information online
>2. where to find the sample source codes.
>3. Any Experiences in implementing bootloader
>4. How to download the Bootloader
>
>Thank you
>Nay Oo
>
>


Yahoo! Messenger
- Log on with your mobile phone!

Re: AVR BootLoader

2004-12-25 by nayoo1979

--- In AVR-Chat@yahoogroups.com, Dave VanHorn <dvanhorn@d...> wrote:
> At 07:56 AM 12/25/2004, nayoo1979 wrote:
> 
> 
> 
> >Hi all,
> >
> >I am trying to implement an ATMega8 bootloader. If anybody has
> >happened to got the experiences before, pls share with me.
> >
> >I will be very grateful to you, if any of you can kindly share 
with
> >me any of the below:
> >1. where to find the useful information online
> >2. where to find the sample source codes.
> >3. Any Experiences in implementing bootloader
> >4. How to download the Bootloader
> 
> Well, you should chat with the other fellow, you are both trying 
to do the 
> same thing.
> 
> Read the atmel app notes.
> 
> Usually, you implement the boot loader through a USART interface, 
but that 
> isn't required. It's just the most conventional way.  You have it 
try to 
> connect with a PC at boot, and if it can't connect within a 
reasonable time 
> (10 seconds?) then you allow the main program to run.
> 
> Nothing prevents you from doing a loader mechanism inside the main 
program 
> either, but that is a more advanced project, and much 
more "delicate".  The 
> nice thing about the boot block is that you can protect it so that 
the boot 
> loader can't destroy itself accidentally.  So, even if the main 
program is 
> totally erased, the boot loader still works.

Hi,
Thanks for your info:

I am very much interested in your statement of Loader Mechanism? Can 
you elaborate a bit more details?  Which documents should I consult 
to build that Loader Mechanism? Any sample assembly codes etc.

Best Regards,
Nay Oo

RE: [AVR-Chat] AVR BootLoader

2004-12-25 by Alex Shepherd

> I am trying to implement an ATMega8 bootloader. If anybody has 
> happened to got the experiences before, pls share with me. 

Have a look at: http://www.microsyl.com/megaload/megaload.html

There is an AVR GCC port of this as well in the User Projects of the
AVRFreaks Academy: http://www.avrfreaks.net/

An AVR GCC implementation of the Stk500 protocol as a boot loader:
http://www.avr1.org/stk500boot/stk500boot.html


Also there is an Atmel app note: 
http://www.atmel.com/dyn/resources/prod_documents/doc1644.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR109.zip

Merry Christmas

Alex Shepherd

Re: [AVR-Chat] AVR BootLoader

2004-12-26 by Henry Carl Ott

Hi,
  The bootloader code needs to be assembled and loaded into the m8 via a 
"conventional programmer". The STK500 is fine.

       AFTER that, application code is loaded into mega8 via the bootloader 
code and the uart interface using the progwin.exe program connected to the 
target avr's uart interface directly (add max232 or other rs232 level 
translator as required).

   Some notes:
  The fuses have to be set properly.
  The boot loader code looks for an <esc> char in the first couple of 
seconds to enter program mode,
     else it vectors to the regular reset int.
  Be sure to use the most recent version of progwin for mega8 support.
  Pay attention to xtal freq. and baud rates

    This is just one quick way to get a bootloader going. As David 
recommended, you really should read the app notes and data sheets to 
understand what is going on. Then you can make a bootloader that meets your 
particular needs. The assembler code is a good resource to see how other 
people are doing this and to perhaps see how the hardware has to be 
configured. I've gotten spoiled by avrfreaks.com site, but all the avr data 
sheets and app. notes are available from amel.com

regards,
-carl

At 10:39 AM 12/25/2004, you wrote:
Show quoted textHide quoted text
>Hi Carl,
>
>Thank you for your short and helpful informations.
>
>I have one question:
>
>"After I download the bootloader, how can I download the Application Codes 
>without using STK500?"
>
>Do I need to write an window application software or can I still use 
>AVRProg.exe or AVRStudio.exe to download Application Codes after that 
>without using programmer?"
>
>Best Regards,
>Nay Oo
>
>Henry Carl Ott <carlott@interport.net> wrote:
>Normally I'd say try www.avrfreaks.com, but the site is down at the moment.
>   You can try the site in a couple of days and see if they can get back up.
>
>   I do have a modified atmel app note boot loader for the mega8 on my
>projects page.
>   <http://users.rcn.com/carlott/>http://users.rcn.com/carlott/
>
>   It's reasonably small, written in assembler, uses the atmel avrprog.exe
>program to download code.
>
>
>Hope that helps a little,
>
>-carl

Re: AVR BootLoader

2004-12-27 by Jose

I want to implement a ATmega16 bootloader.  

Check the following pages:

http://www.lawicel.com/staver/staver40m32boot.htm
http://www.siwawi.arubi.uni-kl.de/avr_projects/evertool/
http://www.microsyl.com/megaload/megaload.html
http://cmeter.org/CVmegaload/


Jose


--- In AVR-Chat@yahoogroups.com, "nayoo1979" <nayoo1979@y...> wrote:
> 
> Hi all,
> 
> I am trying to implement an ATMega8 bootloader. If anybody has 
> happened to got the experiences before, pls share with me. 
> 
> I will be very grateful to you, if any of you can kindly share 
with 
Show quoted textHide quoted text
> me any of the below:
> 1. where to find the useful information online
> 2. where to find the sample source codes.
> 3. Any Experiences in implementing bootloader
> 4. How to download the Bootloader
> 
> Thank you
> Nay Oo

Re: [AVR-Chat] Re: AVR BootLoader

2004-12-27 by Nay Oo

Jose, thanks.
Nay Oo

Jose wrote:

I want to implement a ATmega16 bootloader.

Check the following pages:

http://www.lawicel.com/staver/staver40m32boot.htm
http://www.siwawi.arubi.uni-kl.de/avr_projects/evertool/
http://www.microsyl.com/megaload/megaload.html
http://cmeter.org/CVmegaload/


Jose


--- In AVR-Chat@yahoogroups.com, "nayoo1979" wrote:
>
> Hi all,
>
> I am trying to implement an ATMega8 bootloader. If anybody has
> happened to got the experiences before, pls share with me.
>
> I will be very grateful to you, if any of you can kindly share
with
> me any of the below:
> 1. where to find the useful information online
> 2. where to find the sample source codes.
> 3. Any Experiences in implementing bootloader
> 4. How to download the Bootloader
>
> Thank you
> Nay Oo




Yahoo! Messenger
- Log on with your mobile phone!

I2C Question take 2

2004-12-29 by wbounce

If I want to write 4 different byte values to 1 address to a device what
do I have to do?
I am currently trying
Start condition
Put out the device ID and write 
Put out memory address
Put out a restart request <- not sure if this is needed
Put out the 1st data byte
Put out the 2nd data byte
Put out the 3rd data byte
Put out the 4th data byte

Re: [AVR-Chat] I2C Question take 2

2004-12-29 by Alex Tsigulin

Hello wbounce,

> If I want to write 4 different byte values to 1 address to a device what
> do I have to do?
> I am currently trying
> Start condition
> Put out the device ID and write 
> Put out memory address
> Put out a restart request <- not sure if this is needed

You should delete this line. Device should has way to distinguish
address from data.

> Put out the 1st data byte
> Put out the 2nd data byte
> Put out the 3rd data byte
> Put out the 4th data byte



-- 
Best regards,
 Alex                            mailto:neolp@mail.ru

Re: [AVR-Chat] AVR BootLoader

2004-12-29 by Paul Maddox

Nay Oo,

> I am trying to implement an ATMega8 bootloader. If anybody has
> happened to got the experiences before, pls share with me.

I've done it with the Mega128.

> I will be very grateful to you, if any of you can kindly share with
> me any of the below:
> 1. where to find the useful information online

the atmel app notes and the datasheet for the device.

> 2. where to find the sample source codes.

when I looked I couldn't find any that actually worked, I had to 'make my
own'. That said it was 18 months ago and I had very specific requirements.

> 3. Any Experiences in implementing bootloader

once you get your head around how its done, its as easy as falling off a
log.

> 4. How to download the Bootloader

you must program the bootloader using an ISP, I used CV-AVR to create my
bootloader. whic simplified programming the device.

 Paul

Re: [AVR-Chat] AVR BootLoader

2004-12-29 by Paul Maddox

Nay Oo,

> "After I download the bootloader, how can I download the Application Codes
without using STK500?"
>
> Do I need to write an window application software or can I still use
AVRProg.exe or AVRStudio.exe to download Application Codes after that
without using programmer?"
>

you can write application software, but windows terminal works just aswell,
just send the file down the serial port of your PC, to the serial port of
your AVR :-)

Paul

Re: [AVR-Chat] AVR FREAKS IS BACK UP!!!!!!!!!!!!!!

2004-12-29 by Matthew Cook

Well its sort of up...   you can login and the usual pages are visable but 
don't try to download anything... SQL errors and a prompt return to the 
main page is about all you get...

Hopefully in the coming days they'll get the chance to get all the chickens 
and eggs lining up again.

Matt

Also suffering AVRFreaks withdrawls....

At 23:12 29/12/2004, you wrote:
Show quoted textHide quoted text
>Dingo wrote:
>
> > AVRFreaks is back up ppl
>WOOOOHOOOOOOOO now I can stop annoying the other half lol
>Kat (who had freak withdrawal)

Re: [AVR-Chat] AVR FREAKS IS BACK UP!!!!!!!!!!!!!!

2004-12-29 by Kathy Quinlan

Dingo wrote:

> AVRFreaks is back up ppl


WOOOOHOOOOOOOO now I can stop annoying the other half lol

Kat (who had freak withdrawal)


-- 
---------------------------------------------------------------
K.A.Q. Electronics	Website: www.kaqelectronics.dyndns.org
IM: Yahoo: PinkyDwaggy  MSN: katinka@kaqelectronics.dyndns.org
For Everything Electronics     Phone: 0419 923 731
---------------------------------------------------------------	


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.6 - Release Date: 28/12/2004

RE: [AVR-Chat] I2C Question take 2

2004-12-29 by wbounce

I tried that last night. The code runs through without error but the
sensor has not changed its address. Something else must be wrong.
Show quoted textHide quoted text
-----Original Message-----
From: Alex Tsigulin [mailto:neolp@mail.ru] 
Sent: Tuesday, December 28, 2004 11:55 PM
To: wbounce
Subject: Re: [AVR-Chat] I2C Question take 2



Hello wbounce,

> If I want to write 4 different byte values to 1 address to a device 
> what do I have to do? I am currently trying
> Start condition
> Put out the device ID and write 
> Put out memory address
> Put out a restart request <- not sure if this is needed

You should delete this line. Device should has way to distinguish
address from data.

> Put out the 1st data byte
> Put out the 2nd data byte
> Put out the 3rd data byte
> Put out the 4th data byte



-- 
Best regards,
 Alex                            mailto:neolp@mail.ru




 
Yahoo! Groups Links

Re: [AVR-Chat] AVR BootLoader

2004-12-30 by Ralph Hilton

On Wed, 29 Dec 2004 10:28:28 -0000 you wrote:

I have put up code on www.cmeter.org/CVmegaload .
which I have tested on a mega8.

>> I am trying to implement an ATMega8 bootloader. If anybody has
>> happened to got the experiences before, pls share with me.
>
>I've done it with the Mega128.
>
>> I will be very grateful to you, if any of you can kindly share with
>> me any of the below:
>> 1. where to find the useful information online
>
>the atmel app notes and the datasheet for the device.
>
>> 2. where to find the sample source codes.
>
>when I looked I couldn't find any that actually worked, I had to 'make my
>own'. That said it was 18 months ago and I had very specific requirements.
>
>> 3. Any Experiences in implementing bootloader
>
>once you get your head around how its done, its as easy as falling off a
>log.
>
>> 4. How to download the Bootloader
>
>you must program the bootloader using an ISP, I used CV-AVR to create my
>bootloader. whic simplified programming the device.

--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] newbie absolute value

2005-01-02 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: Geert De Pecker
To: AVR-Chat@yahoogroups.com
Sent: Sunday, January 02, 2005 10:21 PM
Subject: [AVR-Chat] newbie absolute value


Hi,

I have a question about abtaining the absolute value. I want to
substract a 1 16bit values from eachother, but when the result is
negative, set a bit and get the absolute value of the difference.

I thought of the following, but that doesn't seem to work:

...
   ldi direction, 0
; Substract values
   sub moveL, curPosL
   sbc moveH, curPosH
; If result positive, ok
   brcc PM1
; Result negative, take absolute value and set flag
   neg moveL
   neg moveH
   ldi direction, 1
PM1:

Any hints?

I'd compare them first, to find which is the bigger of the two, then 
subtract them appropriately with two separate bits of code, setting the flag 
as necessary.

Leon 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 30/12/2004

newbie absolute value

2005-01-02 by Geert De Pecker

Hi,

I have a question about abtaining the absolute value. I want to 
substract a 1 16bit values from eachother, but when the result is 
negative, set a bit and get the absolute value of the difference.

I thought of the following, but that doesn't seem to work:

...
   ldi direction, 0
; Substract values
   sub moveL, curPosL
   sbc moveH, curPosH
; If result positive, ok
   brcc PM1
; Result negative, take absolute value and set flag
   neg moveL
   neg moveH
   ldi direction, 1
PM1:

Any hints?

Regards and best wishes for 2005 to all,

Geert

USB and ATmega

2005-01-03 by Jose Fuentes

I want to add USB to a circuit with a ATmega
microcontroller, what is the best choice considering
price, compatibility, and speed?

Regards,

Jose


	

	
		
___________________________________________________________ 
250MB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar

Re: [AVR-Chat] USB and ATmega

2005-01-03 by Dave VanHorn

At 09:26 AM 1/3/2005, Jose Fuentes wrote:


>I want to add USB to a circuit with a ATmega
>microcontroller, what is the best choice considering
>price, compatibility, and speed?

FTDI chips work nicely.

Re: [AVR-Chat] USB and ATmega

2005-01-03 by Ralph Hilton

On Mon, 03 Jan 2005 10:11:39 -0500 you wrote:

>
>At 09:26 AM 1/3/2005, Jose Fuentes wrote:
>
>
>>I want to add USB to a circuit with a ATmega
>>microcontroller, what is the best choice considering
>>price, compatibility, and speed?
>
>FTDI chips work nicely. 

Olimex recently brought out a ready made board for trying them out:
http://www.olimex.com/dev/index.html
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: newbie absolute value

2005-01-03 by jimmcguffin

The problem is the "negate" step. You cannot negate the two bytes 
separately. Negation is the same as a ones-complement followed by 
adding one. This is covered in Atmel's application note #202. They 
do it like this:

;***** Register Variables
.def ng1l = r16
.def ng1h = r17

;***** Code
ng16:	
 com    ng1l            ;Invert low byte       ;Calculated by 
 com    ng1h		;Invert high byte      ;inverting all 
 subi   ng1l,low(-1)    ;Add 0x0001, low byte  ;bits then adding
 sbci   ng1h,high(-1)   ;Add high byte         ;one (0x0001)
 ;Expected result is 0xCBEE

Jim


--- In AVR-Chat@yahoogroups.com, "Leon Heller" <leon.heller@d...> 
wrote:
> ----- Original Message ----- 
> From: Geert De Pecker
> To: AVR-Chat@yahoogroups.com
> Sent: Sunday, January 02, 2005 10:21 PM
> Subject: [AVR-Chat] newbie absolute value
> 
> 
> Hi,
> 
> I have a question about abtaining the absolute value. I want to
> substract a 1 16bit values from eachother, but when the result is
> negative, set a bit and get the absolute value of the difference.
> 
> I thought of the following, but that doesn't seem to work:
> 
> ...
>    ldi direction, 0
> ; Substract values
>    sub moveL, curPosL
>    sbc moveH, curPosH
> ; If result positive, ok
>    brcc PM1
> ; Result negative, take absolute value and set flag
>    neg moveL
>    neg moveH
>    ldi direction, 1
> PM1:
> 
> Any hints?
> 
> I'd compare them first, to find which is the bigger of the two, 
then 
> subtract them appropriately with two separate bits of code, 
setting the flag 
> as necessary.
> 
> Leon 
> 
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 
30/12/2004

Re: [AVR-Chat] USB and ATmega

2005-01-04 by Paul Maddox

Hi,

> >I want to add USB to a circuit with a ATmega
> >microcontroller, what is the best choice considering
> >price, compatibility, and speed?
>
> FTDI chips work nicely.

I second that, FTDI chips are great and they come with drivers for
everything!!

Paul

Re: [AVR-Chat] USB and ATmega

2005-01-04 by Jose Fuentes

There are several AVR based USB controllers like the
AT43USB351M.  Have any of you used them?

Jose


AT43USB351M

http://www.atmel.com/dyn/resources/prod_documents/3302s.pdf

Full-speed/Low-speed USB Microcontroller with ADC and
PWM


Features
• AVR® Microcontroller-based Function Controller
• Fully Programmable USB Low/Full-speed Function with
Five Endpoints
• High Performance and Low Power 1.5/12/24 MIPs AVR
RISC Microcontroller
• 120 Powerful Instructions – Most with 83 ns
Execution Cycle Times
• 24 KB Masked ROM Program Memory
• 1 KB Internal SRAM
• 32 x 8 General-purpose Working Registers
• 19 Programmable I/O Port Pins
• 12 Channels 10-bit A-to-D Converter
• Programmable SPI Serial Interface
• One 8-bit Timer Counter with Separate Pre-scaler
• One 16-bit Timer Counter with Separate Pre-scaler
and Two PWMs
• External and Internal Interrupt Sources
• Programmable Watchdog Timer
• Low Power Idle and Power-down Modes
• 6 MHz Crystal Oscillator with PLL
• 5V Operation with On-chip 3.3V Regulators
• 48-lead LQFP Package
• Binary-compatible with the AT43USB355

Description
The Atmel AT43USB351M is a USB AVR-based
microcontroller that is configurable as
a low-speed or full-speed USB device. Its program
memory is a 24-Kbyte mask programmable
ROM and its data memory is 1-Kbyte SRAM. The on-chip
peripherals
consists of 19 general-purpose I/O ports, two
timer-counters, SPI serial interface, a
PWM and a 10-bit AD converter with 12 input channels.
The MCU of the AT43USB351M is a high performance 8-bit
AVR RISC that operates
at a clock frequency of 1.5 MHz, 12 MHz or 24 MHz. The
A-to-D converter has a minimum
conversion time of 12 µs that together with the 12
input channel should cover
even the most demanding game controllers such as
gamepads, joysticks and racing
wheels. The two PWM outputs can be programmed for 8-,
9- or 10-bit resolution for
applications requiring force feedback. The 19
general-purpose programmable I/O pins
provide generous inputs for the various buttons and
switches and LED indicators that
are being used in increasing numbers in today's game
controllers.
The USB function has one control endpoint and four
additional programmable endpoints,
each with their own FIFOs. Two of the endpoints have a
64-byte FIFO each,
while the other two have 8-byte FIFOs. The USB
hardware supports the physical and
link layers of the USB protocol while the transaction
layer function must be implemented
in the MCU's firmware. The AVR architecture was
developed to be
programmed in C efficiently and without loss in
performance.
The AT43USB351M is binary-compatible with the
AT43USB355. Program development
and debugging for the AT43USB351M uses the AT43DK355
and all its tools and
libraries.



		
__________________________________ 
Do you Yahoo!? 
Send a seasonal email greeting and help others. Do good. 
http://celebrity.mail.yahoo.com

Re: [AVR-Chat] USB and ATmega

2005-01-04 by Kathy Quinlan

Jose Fuentes wrote:

> There are several AVR based USB controllers like the
> AT43USB351M.  Have any of you used them?
> 
> Jose
> 

I have the dev kit for the 355M, but I find it hard to use due to lack 
of documentation and example code for beginners, but I am hopping that 
after reading Jan ALexson's USB for embedded design (I think that is the 
title) I will get a grasb on the subject and be able to do something 
useful with them :)

Regards,

Kat.

-- 
---------------------------------------------------------------
K.A.Q. Electronics	Website: www.kaqelectronics.dyndns.org
IM: Yahoo: PinkyDwaggy  MSN: katinka@kaqelectronics.dyndns.org
For Everything Electronics     Phone: 0419 923 731
---------------------------------------------------------------	


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 3/01/2005

RE: [AVR-Chat] USB and ATmega

2005-01-04 by Phillip Vogel

Linx modules have the FTDI chip and all the glue in a 16 pin package.
Hook up VCC, GND, TX, RX and 4 wires to the USB connector and you're
good to go. Available from Digikey. Piece of cake.

Phillip
Show quoted textHide quoted text
> -----Original Message-----
> From: Paul Maddox [mailto:P.Maddox@signal.qinetiq.com] 
> Sent: Tuesday, January 04, 2005 8:24 AM
> To: AVR-Chat@yahoogroups.com
> Subject: Re: [AVR-Chat] USB and ATmega
> 
> 
> 
> Hi,
> 
> > >I want to add USB to a circuit with a ATmega 
> microcontroller, what is 
> > >the best choice considering price, compatibility, and speed?
> >
> > FTDI chips work nicely.
> 
> I second that, FTDI chips are great and they come with 
> drivers for everything!!
> 
> Paul
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
>

Re: [AVR-Chat] USB and ATmega

2005-01-04 by James Washer

For those of us who have never played with USB....  

Once I hook up the FTDI chip... 


What does the AVR "see"?
Is it just serial data? 
Do we have to included any USB aware code on the AVR? 
What kind of USB device driver is required on the host pc to talk to our device?
Does the FTDI handle buffering etc?
Do you have example code you'd be willing to share?

Yes, I'm sure this is all documented somewhere.. but a "jump start" would sure help us beginners

 - jim


On Tue, 4 Jan 2005 10:26:32 -0500
"Phillip Vogel" <phillip@bartal.com> wrote:
Show quoted textHide quoted text
> Linx modules have the FTDI chip and all the glue in a 16 pin package.
> Hook up VCC, GND, TX, RX and 4 wires to the USB connector and you're
> good to go. Available from Digikey. Piece of cake.
> 
> Phillip
> 
> > -----Original Message-----
> > From: Paul Maddox [mailto:P.Maddox@signal.qinetiq.com]
> > Sent: Tuesday, January 04, 2005 8:24 AM
> > To: AVR-Chat@yahoogroups.com
> > Subject: Re: [AVR-Chat] USB and ATmega
> >
> >
> >
> > Hi,
> >
> > > >I want to add USB to a circuit with a ATmega
> > microcontroller, what is
> > > >the best choice considering price, compatibility, and speed?
> > >
> > > FTDI chips work nicely.
> >
> > I second that, FTDI chips are great and they come with
> > drivers for everything!!
> >
> > Paul
> >
> >
> >
> > 
> > Yahoo! Groups Links
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> 
> 
> 
> ------------------------------------------------
> Yahoo! Groups Links
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AVR-Chat/
>  
> To unsubscribe from this group, send an email to:
> AVR-Chat-unsubscribe@yahoogroups.com
>  
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Re: USB and ATmega

2005-01-04 by Gus

FTDI+VCP driver=100%serial port! actually even better since you can 
send data as fast as 3Mb

no USB work on your PC or on yor embedded device

USB <-> serial

Gus Issa
www.ghielectronics.com
FAT file system made easy!

--- In AVR-Chat@yahoogroups.com, James Washer <washer@t...> wrote:
> 
> For those of us who have never played with USB....  
> 
> Once I hook up the FTDI chip... 
> 
> 
> What does the AVR "see"?
> Is it just serial data? 
> Do we have to included any USB aware code on the AVR? 
> What kind of USB device driver is required on the host pc to talk 
to our device?
> Does the FTDI handle buffering etc?
> Do you have example code you'd be willing to share?
> 
> Yes, I'm sure this is all documented somewhere.. but a "jump 
start" would sure help us beginners
> 
>  - jim
> 
> 
> On Tue, 4 Jan 2005 10:26:32 -0500
> "Phillip Vogel" <phillip@b...> wrote:
> 
> > Linx modules have the FTDI chip and all the glue in a 16 pin 
package.
> > Hook up VCC, GND, TX, RX and 4 wires to the USB connector and 
you're
> > good to go. Available from Digikey. Piece of cake.
> > 
> > Phillip
> > 
> > > -----Original Message-----
> > > From: Paul Maddox [mailto:P.Maddox@s...]
> > > Sent: Tuesday, January 04, 2005 8:24 AM
> > > To: AVR-Chat@yahoogroups.com
> > > Subject: Re: [AVR-Chat] USB and ATmega
> > >
> > >
> > >
> > > Hi,
> > >
> > > > >I want to add USB to a circuit with a ATmega
> > > microcontroller, what is
> > > > >the best choice considering price, compatibility, and speed?
> > > >
> > > > FTDI chips work nicely.
> > >
> > > I second that, FTDI chips are great and they come with
> > > drivers for everything!!
> > >
> > > Paul
> > >
> > >
> > >
> > > 
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > > 
> > >
> > >
> > >
> > >
> > >
> > 
> > 
> > 
> > ------------------------------------------------
> > Yahoo! Groups Links
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/AVR-Chat/
> >  
> > To unsubscribe from this group, send an email to:
> > AVR-Chat-unsubscribe@yahoogroups.com
> >  
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.

RE: [AVR-Chat] USB and ATmega

2005-01-04 by Phillip Vogel

In the simplest setup, the AVR just sees async serial data. It doesn't
know anything at all about USB. On the PC end, you install drivers from
FTDI or Lynx that make the device look like a comm port. Dead simple.
There are lots of documents at the FTDI web site.

If you want to just try it out, either one of the proto boards mentioned
earlier in this thread or one of the Lynx modules would be very easy to
hook up and play with. Tho just check out the USB end, you could just
connect the serial transmit and receive lines to each other and skip the
AVR altogether.

Phillip
www.VisualConductor.com
Show quoted textHide quoted text
> -----Original Message-----
> From: James Washer [mailto:washer@trlp.com] 
> Sent: Tuesday, January 04, 2005 12:25 PM
> To: AVR-Chat@yahoogroups.com
> Cc: phillip@bartal.com
> Subject: Re: [AVR-Chat] USB and ATmega
> 
> 
> 
> For those of us who have never played with USB....  
> 
> Once I hook up the FTDI chip... 
> 
> 
> What does the AVR "see"?
> Is it just serial data? 
> Do we have to included any USB aware code on the AVR? 
> What kind of USB device driver is required on the host pc to 
> talk to our device? Does the FTDI handle buffering etc? Do 
> you have example code you'd be willing to share?
> 
> Yes, I'm sure this is all documented somewhere.. but a "jump 
> start" would sure help us beginners
> 
>  - jim
> 
> 
> On Tue, 4 Jan 2005 10:26:32 -0500
> "Phillip Vogel" <phillip@bartal.com> wrote:
> 
> > Linx modules have the FTDI chip and all the glue in a 16 
> pin package. 
> > Hook up VCC, GND, TX, RX and 4 wires to the USB connector 
> and you're 
> > good to go. Available from Digikey. Piece of cake.
> > 
> > Phillip
> > 
> > > -----Original Message-----
> > > From: Paul Maddox [mailto:P.Maddox@signal.qinetiq.com]
> > > Sent: Tuesday, January 04, 2005 8:24 AM
> > > To: AVR-Chat@yahoogroups.com
> > > Subject: Re: [AVR-Chat] USB and ATmega
> > >
> > >
> > >
> > > Hi,
> > >
> > > > >I want to add USB to a circuit with a ATmega
> > > microcontroller, what is
> > > > >the best choice considering price, compatibility, and speed?
> > > >
> > > > FTDI chips work nicely.
> > >
> > > I second that, FTDI chips are great and they come with 
> drivers for 
> > > everything!!
> > >
> > > Paul
> > >
> > >
> > >
> > > 
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > > 
> > >
> > >
> > >
> > >
> > >
> > 
> > 
> > 
> > ------------------------------------------------
> > Yahoo! Groups Links
> > To visit your group on the web, go to: 
> > http://groups.yahoo.com/group/AVR-Chat/
> >  
> > To unsubscribe from this group, send an email to: 
> > AVR-Chat-unsubscribe@yahoogroups.com
> >  
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> 
>

Re: [AVR-Chat] USB and ATmega

2005-01-05 by Paul Maddox

James,

> Once I hook up the FTDI chip...
>
>
> What does the AVR "see"?
> Is it just serial data?

If you buy the serial version, yes.
There's alsoa parallel version.

> Do we have to included any USB aware code on the AVR?

nope, just receive and send data, simple.

> What kind of USB device driver is required on the host pc to talk to our
device?

The one supplied with the chip, or from their website.
For the project I used, we used it as an 11Mb serial port :-)

> Does the FTDI handle buffering etc?

yes.

> Do you have example code you'd be willing to share?

Nothing to share, the parallel version (I used), has a line that drops low
when it's received data and stay low whilst there's stuff in the buffer. You
simply hook this to a falling edge IRQ, read the data using the /RD line,
and check to see if the line is still low, if it is, read again.

If you use the serial version you don't even need that.
Just receive data as it comes in.

Paul

Motor protection

2005-01-05 by Svenn Dahlstrøm

Hi all!

I have this application that controls a 220W AC motor.
This motor needs some protection.
And the Mega16 need to know about it.
Do any of you guys know of a cuircuit or any chip to sense the current to 
the motor,
and give the Mega16 feedback, so the motor can bee shut down.

Thanx
Svenn

USI in ATTINY2313 for SPI

2005-01-05 by Ridho Alpha

hello

this is my first project with ATTINY, so compact...ok...i want to use 2 ATTINY2313 as slave and 1 ATMEGA16 for master...since for slave AVRs needs to make low the /SS for SPI...but the ATTINY2313 has no /SS pin....

so can i use EXTERNAL INTERRUPT 0 pin from ATTINY2313 (slaves) to be driven low by master????

like example below (only for /SS and SCK):

MASTER SLAVE 1 (ATTINY2313) SLAVE2 (ATTINY2313)

PORTB.0 ---------------------------------- INT0 (PD.2)

PORTB.1 -----------------------------------------------------------------------------------------INT0(PD.2)

PORTB.7 (SCK) ----------------------------PORTB.7(USCK) -------------------------PORTB.7(USCK)

is it true????please help me

thank you

Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.

[AVR-Chat] Motor protection

2005-01-05 by Svenn Dahlstrøm

Hi all!

I have this application that controls a 220W AC motor.
This motor needs some protection.
And the Mega16 need to know about it.
Do any of you guys know of a cuircuit or any chip to sense the current to
the motor,
and give the Mega16 feedback, so the motor can bee shut down.

Thanx
Svenn

Re: [AVR-Chat] Motor protection

2005-01-05 by Jim Wagner

Allegro makes a number of hall based current sensors. They
provide isolation you would need in this application. You
should be able to read the output of a sensor with an ADC
and use the micro to run some of the motor control
circuits.

Jim


On Wed, 5 Jan 2005 15:52:28 +0100
 Svenn Dahlstrøm <svenn@symetrics.no> wrote:
> Hi all!
> 
> I have this application that controls a 220W AC motor.
> This motor needs some protection.
> And the Mega16 need to know about it.
> Do any of you guys know of a cuircuit or any chip to
> sense the current to 
> the motor,
> and give the Mega16 feedback, so the motor can bee shut
> down.
> 
> Thanx
> Svenn 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: USB and ATmega

2005-01-05 by Joel Kolstad

--- In AVR-Chat@yahoogroups.com, Kathy Quinlan <kat-yahoo@k...> 
wrote:
> I have the dev kit for the 355M, but I find it hard to use due to 
lack 
> of documentation and example code for beginners, but I am hopping 
that 
> after reading Jan ALexson's USB for embedded design (I think that 
is the 
> title) I will get a grasb on the subject and be able to do 
something 
> useful with them :)

You'll also want to check out the USB developers forum 
(http://www.usb.org/phpbb/); there's been plenty of discussion there 
about the AT43USB355E (and variants), and Jan Axelson shows up 
occasionally as well.

I used the AT43USB355E to implement what was effectively a USB <--> 
I2C interface with a few extra bells and whistles last year.  The 
problem, at the time, was that the code that comes with the Atmel 
development kit is heavily biased towards building a human interface 
device such as an X-box joystick (this is what the AT43USB355E was 
initally designed by Atmel to do!); they do NOT give you all the 
source code you need to build a 'general purpose' USB device.  
However, if you pester the appropriate people at Atmel (see the USB 
IF forum for details), you CAN get all the source code except for 
one file that contains the functionality of the hub in the '355E; 
Atmel considers this proprietary, and given that no one else seems 
to be handing out hub source code, that seems reasonable enough.

Overall, there's a lot more work if you use the '355E than if you 
simply use an FTDI chip.  What you gain, however, is better 
throughput (speed) in the system (compared to the serial FTDI chips) 
and the ability to have your USB device looks like 'whatever you 
want it to' rather than 'just' a serial port.  You're also adding 
another chip with the FTDI approach, of course.  On the downside, 
for the '355E you'll also have to write your own USB device driver 
(highly non-trivial if you haven't done this before, although there 
are toolkits out there that make this a lot easier if you can afford 
them -- we used DriverX USB) unless you make the '355E look like a 
human interface device (HID) -- which pretty much negates the speed 
advantage that you otherwise would have gained.

Hence, if the FTDI chip will work for your project, unless you're 
going into mass production (where the extra cost of the FTDI chip 
more than pays for the added development costs), or unless you're 
interested in learning a lot about low level USB (this was my 
motivation), it's pretty hard to beat the FTDI approach.

BTW, there's a web site out there about a guy who implements a low 
speed (1.5Mbps) USB peripheral strictly via 'bit banging' the I/O 
ports.  Once you get done reading Jan's book, you'll realize just 
how impressive that feat is!  Interestingly, he did it using one of 
the older devices (this was a couple of years back), and since then 
the newer devices such as the tiny2313 have come out with faster 
clock speeds and more memory that would be even more attractive for 
this purpose.  It's a HUGE amount of work to do this (the guy with 
the web site said he spent six months working almost every night 
after work getting to the point where Windows would recognize his 
device), but it'd be a great benefit to the AVR-using community if 
someone did.

---Joel Kolstad

Re: [AVR-Chat] Re: newbie absolute value

2005-01-05 by Geert De Pecker

Jim,

Thanks. This seems to work ok.

Geert

jimmcguffin wrote:
Show quoted textHide quoted text
> 
> The problem is the "negate" step. You cannot negate the two bytes
> separately. Negation is the same as a ones-complement followed by
> adding one. This is covered in Atmel's application note #202. They
> do it like this:
> 
> ;***** Register Variables
> .def ng1l = r16
> .def ng1h = r17
> 
> ;***** Code
> ng16:     
> com    ng1l            ;Invert low byte       ;Calculated by
> com    ng1h            ;Invert high byte      ;inverting all
> subi   ng1l,low(-1)    ;Add 0x0001, low byte  ;bits then adding
> sbci   ng1h,high(-1)   ;Add high byte         ;one (0x0001)
> ;Expected result is 0xCBEE
> 
> Jim
> 
> 
> --- In AVR-Chat@yahoogroups.com, "Leon Heller" <leon.heller@d...>
> wrote:
>  > ----- Original Message -----
>  > From: Geert De Pecker
>  > To: AVR-Chat@yahoogroups.com
>  > Sent: Sunday, January 02, 2005 10:21 PM
>  > Subject: [AVR-Chat] newbie absolute value
>  >
>  >
>  > Hi,
>  >
>  > I have a question about abtaining the absolute value. I want to
>  > substract a 1 16bit values from eachother, but when the result is
>  > negative, set a bit and get the absolute value of the difference.
>  >
>  > I thought of the following, but that doesn't seem to work:
>  >
>  > ...
>  >    ldi direction, 0
>  > ; Substract values
>  >    sub moveL, curPosL
>  >    sbc moveH, curPosH
>  > ; If result positive, ok
>  >    brcc PM1
>  > ; Result negative, take absolute value and set flag
>  >    neg moveL
>  >    neg moveH
>  >    ldi direction, 1
>  > PM1:
>  >
>  > Any hints?
>  >
>  > I'd compare them first, to find which is the bigger of the two,
> then
>  > subtract them appropriately with two separate bits of code,
> setting the flag
>  > as necessary.
>  >
>  > Leon
>  >
>  >
>  >
>  > --
>  > No virus found in this outgoing message.
>  > Checked by AVG Anti-Virus.
>  > Version: 7.0.298 / Virus Database: 265.6.7 - Release Date:
> 30/12/2004
> 
> 
> 
> 
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
> 
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/AVR-Chat/
>        
>     * To unsubscribe from this group, send an email to:
>       AVR-Chat-unsubscribe@yahoogroups.com
>       <mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>        
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>. 
> 
>

Re: [AVR-Chat] USB and ATmega

2005-01-06 by Mike Murphree

On Jan 4, 2005, at 8:58 AM, Kathy Quinlan wrote:

>
> Jose Fuentes wrote:
>
>> There are several AVR based USB controllers like the
>> AT43USB351M.  Have any of you used them?
>>
>> Jose
>>
>
> I have the dev kit for the 355M, but I find it hard to use due to lack
> of documentation and example code for beginners, but I am hopping that
> after reading Jan ALexson's USB for embedded design (I think that is 
> the
> title) I will get a grasb on the subject and be able to do something
> useful with them :)

I have Jan Axelson's "USB Complete: Everything You Need to Develop 
Custom USB Peripherals" book here.  I'm not sure that I would call it 
"complete".  It's an introductory text,  it covers a Cypress USB micro 
and some Windows details.  It has a CD with it and mentions her 
website: http://www.lvr.com  The CD has some Cypress tools and code 
examples for a mouse, joystick, and UPS.  It covers some of the 
protocol details but hardly appears to be an exhaustive account.

If you had the USB spec and the book, it *might* be enough to get you 
started.

Mike

Re: [AVR-Chat] Motor protection

2005-01-06 by Svenn Dahlstrøm

Thanx a lot Jim, exactly what I was looking for :-)

Svenn
Show quoted textHide quoted text
>
> Allegro makes a number of hall based current sensors. They
> provide isolation you would need in this application. You
> should be able to read the output of a sensor with an ADC
> and use the micro to run some of the motor control
> circuits.
>
> Jim
>
>
> On Wed, 5 Jan 2005 15:52:28 +0100
> Svenn Dahlstrøm <svenn@symetrics.no> wrote:
>> Hi all!
>>
>> I have this application that controls a 220W AC motor.
>> This motor needs some protection.
>> And the Mega16 need to know about it.
>> Do any of you guys know of a cuircuit or any chip to
>> sense the current to
>> the motor,
>> and give the Mega16 feedback, so the motor can bee shut
>> down.
>>
>> Thanx
>> Svenn
>
> ---------------------------------------------------------------
> The Think Different Store
> http://www.thinkdifferentstore.com/
> For All Your Mac Gear
> ---------------------------------------------------------------
>
>
>
> Yahoo! Groups Links
>
>
>
>

Re: [AVR-Chat] USB and ATmega

2005-01-06 by Jose Fuentes

I found two interesting documents in Atmel's web site:

AVR USB Firmware Library
http://www.atmel.com/dyn/resources/prod_documents/doc3518.pdf


AT43USB355 USB DEVELOPMENT KIT
http://www.atmel.com/dyn/resources/prod_documents/doc3335.pdf


Regards,

Jose


 --- Mike Murphree <mike@tropo.org> escribió: 
> 
> 
> On Jan 4, 2005, at 8:58 AM, Kathy Quinlan wrote:
> 
> >
> > Jose Fuentes wrote:
> >
> >> There are several AVR based USB controllers like
> the
> >> AT43USB351M.  Have any of you used them?
> >>
> >> Jose
> >>
> >
> > I have the dev kit for the 355M, but I find it
> hard to use due to lack
> > of documentation and example code for beginners,
> but I am hopping that
> > after reading Jan ALexson's USB for embedded
> design (I think that is 
> > the
> > title) I will get a grasb on the subject and be
> able to do something
> > useful with them :)
> 
> I have Jan Axelson's "USB Complete: Everything You
> Need to Develop 
> Custom USB Peripherals" book here.  I'm not sure
> that I would call it 
> "complete".  It's an introductory text,  it covers a
> Cypress USB micro 
> and some Windows details.  It has a CD with it and
> mentions her 
> website: http://www.lvr.com  The CD has some Cypress
> tools and code 
> examples for a mouse, joystick, and UPS.  It covers
> some of the 
> protocol details but hardly appears to be an
> exhaustive account.
> 
> If you had the USB spec and the book, it *might* be
> enough to get you 
> started.
> 
> Mike
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     AVR-Chat-unsubscribe@yahoogroups.com
> 
>  
> 
> 
> 
>  


	

	
		
___________________________________________________________ 
250MB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar

Re: [AVR-Chat] Re: USB and ATmega

2005-01-07 by Jose Fuentes

AT43USB355E price is u$4.50.  I am wondering if it
would be an appropiate device to develop a mixing
console with +32 knobs (potentiometers).  The device
has to measure the knobs position (thruough the ADC)
and send the values over USB.  Is AT43USB355E fast
enough to this application?

Regards,

Jose

 --- Joel Kolstad <jkolstad71@yahoo.com> escribió: 
> 
> 
> --- In AVR-Chat@yahoogroups.com, Kathy Quinlan
> <kat-yahoo@k...> 
> wrote:
> > I have the dev kit for the 355M, but I find it
> hard to use due to 
> lack 
> > of documentation and example code for beginners,
> but I am hopping 
> that 
> > after reading Jan ALexson's USB for embedded
> design (I think that 
> is the 
> > title) I will get a grasb on the subject and be
> able to do 
> something 
> > useful with them :)
> 
> You'll also want to check out the USB developers
> forum 
> (http://www.usb.org/phpbb/); there's been plenty of
> discussion there 
> about the AT43USB355E (and variants), and Jan
> Axelson shows up 
> occasionally as well.
> 
> I used the AT43USB355E to implement what was
> effectively a USB <--> 
> I2C interface with a few extra bells and whistles
> last year.  The 
> problem, at the time, was that the code that comes
> with the Atmel 
> development kit is heavily biased towards building a
> human interface 
> device such as an X-box joystick (this is what the
> AT43USB355E was 
> initally designed by Atmel to do!); they do NOT give
> you all the 
> source code you need to build a 'general purpose'
> USB device.  
> However, if you pester the appropriate people at
> Atmel (see the USB 
> IF forum for details), you CAN get all the source
> code except for 
> one file that contains the functionality of the hub
> in the '355E; 
> Atmel considers this proprietary, and given that no
> one else seems 
> to be handing out hub source code, that seems
> reasonable enough.
> 
> Overall, there's a lot more work if you use the
> '355E than if you 
> simply use an FTDI chip.  What you gain, however, is
> better 
> throughput (speed) in the system (compared to the
> serial FTDI chips) 
> and the ability to have your USB device looks like
> 'whatever you 
> want it to' rather than 'just' a serial port. 
> You're also adding 
> another chip with the FTDI approach, of course.  On
> the downside, 
> for the '355E you'll also have to write your own USB
> device driver 
> (highly non-trivial if you haven't done this before,
> although there 
> are toolkits out there that make this a lot easier
> if you can afford 
> them -- we used DriverX USB) unless you make the
> '355E look like a 
> human interface device (HID) -- which pretty much
> negates the speed 
> advantage that you otherwise would have gained.
> 
> Hence, if the FTDI chip will work for your project,
> unless you're 
> going into mass production (where the extra cost of
> the FTDI chip 
> more than pays for the added development costs), or
> unless you're 
> interested in learning a lot about low level USB
> (this was my 
> motivation), it's pretty hard to beat the FTDI
> approach.
> 
> BTW, there's a web site out there about a guy who
> implements a low 
> speed (1.5Mbps) USB peripheral strictly via 'bit
> banging' the I/O 
> ports.  Once you get done reading Jan's book, you'll
> realize just 
> how impressive that feat is!  Interestingly, he did
> it using one of 
> the older devices (this was a couple of years back),
> and since then 
> the newer devices such as the tiny2313 have come out
> with faster 
> clock speeds and more memory that would be even more
> attractive for 
> this purpose.  It's a HUGE amount of work to do this
> (the guy with 
> the web site said he spent six months working almost
> every night 
> after work getting to the point where Windows would
> recognize his 
> device), but it'd be a great benefit to the
> AVR-using community if 
> someone did.
> 
> ---Joel Kolstad
> 
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     AVR-Chat-unsubscribe@yahoogroups.com
> 
>  
> 
> 
> 
>  


	

	
		
___________________________________________________________ 
250MB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar

Re: USB and ATmega

2005-01-08 by Joel Kolstad

Hi Jose,

--- In AVR-Chat@yahoogroups.com, Jose Fuentes 
<josecarlosfuentes@y...> wrote:
> AT43USB355E price is u$4.50.  I am wondering if it
> would be an appropiate device to develop a mixing
> console with +32 knobs (potentiometers).  The device
> has to measure the knobs position (thruough the ADC)
> and send the values over USB.  Is AT43USB355E fast
> enough to this application?

I don't remember the part's exact specs anymore, but off-the-cuff, 
yes, I think it would be plenty fast.  The AVR part of it is 
identical feature-wise to a 90S8515 running at 12MHz, which is 
pretty respectable.  You'd need some sort of multiplexing to get all 
32 knobs into the part, though -- there are only 12 ADC channels.  
(4 banks of 8 or 3 banks of 11 might work well...)  The maximum ADC 
conversion speed is something in the ballpark of 100kHz, so with 32 
inputs you'd be looking at still being able to sample thousands of 
times per second -- plenty.

---Joel

Re: Fuses

2005-01-10 by Jeffrey Engel

I'm having some problems with my Mega8's serial port
or crystal.

It's programmed to use 9600 baud, but seems to
transmit at 1200 baud.  Either I'm not doing something
correctly (likely) or the Mega8 is running at 1/8
speed.

It's an 8Mhz crystal and the fuses that are set are:

  CKSEL1
  CKSEL2
  CKSEL3
  SUT0
  BOOTSZ0
  BOOTSZ1

I've read the .PDF several times and don't see
anything wrong with those settings.

Any ideas?

TIA,

Jeff Engel
Arlington, TX

=====
Happiness is - positive intake manifold pressure.


		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail

Re: [AVR-Chat] Re: Fuses

2005-01-10 by gouy yann

--- Jeffrey Engel <jengeltx@yahoo.com> a écrit : 
> 
> I'm having some problems with my Mega8's serial port
> or crystal.
> 
> It's programmed to use 9600 baud, but seems to
> transmit at 1200 baud.  Either I'm not doing
> something
> correctly (likely) or the Mega8 is running at 1/8
> speed.
> 
> It's an 8Mhz crystal and the fuses that are set are:
> 
>   CKSEL1
>   CKSEL2
>   CKSEL3
>   SUT0
>   BOOTSZ0
>   BOOTSZ1

Hi,

with CKSEL1, CKSEL2 and CKSEL3 to 1, you are running
on internal oscillator at 1 MHz, this explains your
1/8 ratio.

to run on 8MHz external crystal, you need to have
CKSEL1, CKSEL2 and CKSEL3 programmed that is set to 0
(zero), that the trick with fuses!!!

regards.
   Yann

> 
> I've read the .PDF several times and don't see
> anything wrong with those settings.
> 
> Any ideas?
> 
> TIA,
> 
> Jeff Engel
> Arlington, TX
> 
> =====
> Happiness is - positive intake manifold pressure.
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Read only the mail you want - Yahoo! Mail SpamGuard.
> 
> http://promotions.yahoo.com/new_mail 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     AVR-Chat-unsubscribe@yahoogroups.com
> 
>  
> 
> 
> 
>  

=====



	

	
		
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

Re: [AVR-Chat] Re: Fuses

2005-01-10 by Kathy Quinlan

Jeffrey Engel wrote:

> I'm having some problems with my Mega8's serial port
> or crystal.
> 
> It's programmed to use 9600 baud, but seems to
> transmit at 1200 baud.  Either I'm not doing something
> correctly (likely) or the Mega8 is running at 1/8
> speed.
> 
> It's an 8Mhz crystal and the fuses that are set are:
> 
>   CKSEL1
>   CKSEL2
>   CKSEL3
>   SUT0
>   BOOTSZ0
>   BOOTSZ1
> 
> I've read the .PDF several times and don't see
> anything wrong with those settings.
> 
> Any ideas?
> 
> TIA,
> 
> Jeff Engel
> Arlington, TX
> 
> =====
> Happiness is - positive intake manifold pressure.

Get AVR studio, and ask it to read the fuses in, it gives a nice 
graphical screen with description, and insteal of worrying about 
individual fuses it sets them for you for different options.

For an 8Mhz xtal I would run in the high speed xtal mode.

Regards,

Kat.


-- 
---------------------------------------------------------------
K.A.Q. Electronics	Website: www.kaqelectronics.dyndns.org
IM: Yahoo: PinkyDwaggy  MSN: katinka@kaqelectronics.dyndns.org
For Everything Electronics     Phone: 0419 923 731
---------------------------------------------------------------	


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 6/01/2005

Re: [AVR-Chat] Re: Fuses

2005-01-10 by gouy yann

Hi again,

oops, it miss it again: it is exactly the opposite.

CKSEL[1:3] programmed (= 0) => internal oscillar 1 MHz
CKSEL[1:3] unprogrammed (= 1) => external crystal 8
MHz

sorry, this inverse logic is quite error prone.

beware your programmer, if it's a GUI, the box check
could mean "programmed".

regards.
   Yann

 --- Jeffrey Engel <jengeltx@yahoo.com> a écrit : 
> 
> I'm having some problems with my Mega8's serial port
> or crystal.
> 
> It's programmed to use 9600 baud, but seems to
> transmit at 1200 baud.  Either I'm not doing
> something
> correctly (likely) or the Mega8 is running at 1/8
> speed.
> 
> It's an 8Mhz crystal and the fuses that are set are:
> 
>   CKSEL1
>   CKSEL2
>   CKSEL3
>   SUT0
>   BOOTSZ0
>   BOOTSZ1
> 
> I've read the .PDF several times and don't see
> anything wrong with those settings.
> 
> Any ideas?
> 
> TIA,
> 
> Jeff Engel
> Arlington, TX
> 
> =====
> Happiness is - positive intake manifold pressure.
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Read only the mail you want - Yahoo! Mail SpamGuard.
> 
> http://promotions.yahoo.com/new_mail 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     AVR-Chat-unsubscribe@yahoogroups.com
> 
>  
> 
> 
> 
>  

=====



	

	
		
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

Re: [AVR-Chat] Re: Fuses

2005-01-10 by beaver

10 stycznia 2005, 11:21

10 stycznia 2005, 07:59, Jeffrey napisał(a):
> I'm having some problems with my Mega8's serial port
> or crystal.

> It's programmed to use 9600 baud, but seems to
> transmit at 1200 baud.  Either I'm not doing something
> correctly (likely) or the Mega8 is running at 1/8
> speed.

> It's an 8Mhz crystal and the fuses that are set are:

>   CKSEL1
>   CKSEL2
>   CKSEL3
>   SUT0
>   BOOTSZ0
>   BOOTSZ1

> I've read the .PDF several times and don't see
> anything wrong with those settings.

> Any ideas?

> TIA,

These fuse selections indicate that mcu uses internal RC oscilator set
at 1Mhz, (see manual p. 221). I'm using serial port without problems
in this configuration. You should also limit connection speed due to
transmission errors. For exaple with internal oscilator maximal speed
with errors < 0.2% is 4800bps (see manual p. 156)

-- 
beaver

JID: bvr@jabber.org

Re: [AVR-Chat] Re: Fuses

2005-01-10 by Jeffrey Engel

Thanks for helping with a newbie error, everyone!

Setting the fuses correctly worked.  I was
misinterpreting whether the checked boxes in PonyProg
meant the fuses were set or cleared.

Jeff Engel
--- beaver <bvr@o2.pl> wrote:

> 10 stycznia 2005, 11:21
> 
> 10 stycznia 2005, 07:59, Jeffrey napisa�(a):
> > I'm having some problems with my Mega8's serial
> port
> > or crystal.
> 
> > It's programmed to use 9600 baud, but seems to
> > transmit at 1200 baud.  Either I'm not doing
> something
> > correctly (likely) or the Mega8 is running at 1/8
> > speed.
> 
> > It's an 8Mhz crystal and the fuses that are set
> are:
> 
> >   CKSEL1
> >   CKSEL2
> >   CKSEL3
> >   SUT0
> >   BOOTSZ0
> >   BOOTSZ1
> 
> > I've read the .PDF several times and don't see
> > anything wrong with those settings.
> 
> > Any ideas?
> 
> > TIA,
> 
> These fuse selections indicate that mcu uses
> internal RC oscilator set
> at 1Mhz, (see manual p. 221). I'm using serial port
> without problems
> in this configuration. You should also limit
> connection speed due to
> transmission errors. For exaple with internal
> oscilator maximal speed
> with errors < 0.2% is 4800bps (see manual p. 156)
> 
> -- 
> beaver
> 
> JID: bvr@jabber.org
> 
> 
> 


=====
Happiness is - positive intake manifold pressure.


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com

Re: USB and ATmega

2005-01-11 by saaibaa

Hi

just to mention that philips has a usb controller isp1181 which is 
pretty good. (at least i like it)

cheers,
Leif


--- In AVR-Chat@yahoogroups.com, "Phillip Vogel" <phillip@b...> 
wrote:
> Linx modules have the FTDI chip and all the glue in a 16 pin 
package.
> Hook up VCC, GND, TX, RX and 4 wires to the USB connector and 
you're
Show quoted textHide quoted text
> good to go. Available from Digikey. Piece of cake.
> 
> Phillip
> 
> > -----Original Message-----
> > From: Paul Maddox [mailto:P.Maddox@s...] 
> > Sent: Tuesday, January 04, 2005 8:24 AM
> > To: AVR-Chat@yahoogroups.com
> > Subject: Re: [AVR-Chat] USB and ATmega
> > 
> > 
> > 
> > Hi,
> > 
> > > >I want to add USB to a circuit with a ATmega 
> > microcontroller, what is 
> > > >the best choice considering price, compatibility, and speed?
> > >
> > > FTDI chips work nicely.
> > 
> > I second that, FTDI chips are great and they come with 
> > drivers for everything!!
> > 
> > Paul
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> >

Testing a switch on ATMega128

2005-01-18 by wbounce

I have the following 

5v ------ switch ------10K resistor --- ground
                   |
                   |-- 330 resistor -- PORTD4


This is supposed to be a switch with a pull down resistor.

By default the pull up resistors should be on for a Atmega128 so I did
the following

DDRD &=  0xEF; // turn pin4 to input
PORTD &=  0xEF;  // write 0 to pin4 to disable pullup


	printf("pinb %i ",PIND4);
	if (PIND4) 
	{
	PORTB ^= 0x01;    // off LED 
	}
	else
	{
    	PORTB |= 0x01;    // on LED 
	}

Elsewhere in the program I am using PORTD0 and PORTD1 for I2C other than
the pin on the rest of the port is not being used.

No matter what the switch is (opened or closed) the printf always look
like pinb 4.

What am I doing wrong? I know the switch is working properly because I
tested it by having the wire that would go to a LED on a breadboard and
I can get the LED to light when the switch is closed.

RE: [AVR-Chat] Testing a switch on ATMega128

2005-01-18 by Larry Barello

What is "PIND4"?  You wouldn't happen to mean PIND.4 or (PIND & (1<<PIND4))
or PIND.PD4 or some variation like that?  Which compiler?
Show quoted textHide quoted text
-----Original Message-----
From: wbounce

I have the following

5v ------ switch ------10K resistor --- ground
                   |
                   |-- 330 resistor -- PORTD4


This is supposed to be a switch with a pull down resistor.

By default the pull up resistors should be on for a Atmega128 so I did
the following

DDRD &=  0xEF; // turn pin4 to input
PORTD &=  0xEF;  // write 0 to pin4 to disable pullup


	printf("pinb %i ",PIND4);
	if (PIND4)
	{
	PORTB ^= 0x01;    // off LED

Re: [AVR-Chat] Testing a switch on ATMega128

2005-01-18 by Paul Maddox

> I have the following 
> 
> 5v ------ switch ------10K resistor --- ground
>                    |
>                    |-- 330 resistor -- PORTD4
> 

huh?
Try this ;-

5v ------ switch --+---10K resistor --- ground
                             |
                             |--- PORTD4
 
This assumes the switch is the 'normally open' type.

> printf("pinb %i ",PIND4);
> if (PIND4) 

Assuming we're talking CodeVision AVR ;-
> printf("pinb %i ",PIND.4);
> if (PIND.4) 

Paul

RE: [AVR-Chat] Testing a switch on ATMega128

2005-01-19 by wbounce

Sorry forgot to include compiler WIN AVR avr-gcc (GCC) 3.4.1
Thanks you hit the nail on the head. 

Changed it to 
if (PIND & (1<<PIND4)) 

and it is working.
Show quoted textHide quoted text
-----Original Message-----
From: Larry Barello [mailto:yahoo@barello.net] 
Sent: Monday, January 17, 2005 11:16 PM
To: AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] Testing a switch on ATMega128



What is "PIND4"?  You wouldn't happen to mean PIND.4 or (PIND &
(1<<PIND4)) or PIND.PD4 or some variation like that?  Which compiler?


-----Original Message-----
From: wbounce

I have the following

5v ------ switch ------10K resistor --- ground
                   |
                   |-- 330 resistor -- PORTD4


This is supposed to be a switch with a pull down resistor.

By default the pull up resistors should be on for a Atmega128 so I did
the following

DDRD &=  0xEF; // turn pin4 to input
PORTD &=  0xEF;  // write 0 to pin4 to disable pullup


	printf("pinb %i ",PIND4);
	if (PIND4)
	{
	PORTB ^= 0x01;    // off LED



 
Yahoo! Groups Links

RE: [AVR-Chat] Testing a switch on ATMega128

2005-01-19 by wbounce

Do you mean don't put a current limiting resistor between the switch and
PORTD4?
Show quoted textHide quoted text
-----Original Message-----
From: Paul Maddox [mailto:P.Maddox@signal.qinetiq.com] 
Sent: Tuesday, January 18, 2005 3:59 AM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Testing a switch on ATMega128




> I have the following
> 
> 5v ------ switch ------10K resistor --- ground
>                    |
>                    |-- 330 resistor -- PORTD4
> 

huh?
Try this ;-

5v ------ switch --+---10K resistor --- ground
                             |
                             |--- PORTD4
 
This assumes the switch is the 'normally open' type.

> printf("pinb %i ",PIND4);
> if (PIND4)

Assuming we're talking CodeVision AVR ;-
> printf("pinb %i ",PIND.4);
> if (PIND.4)

Paul


 
Yahoo! Groups Links

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.