Forum Index > General > Ask an Evil Mad Scientist!
 Crystal
 |  Printable Version
By: Anonymous: linxdev () on Thursday, August 25 2011 @ 01:24 PM PDT  
Anonymous: linxdev

I've also seen this

PHP Formatted Code

avrdude -V -F -C /etc/avrdude.conf  -p atmega328p -P /dev/ttyUSB0 -c stk500v1  -b 115200 -U flash:w:tmp/k4l_keyer.hex

avrdude.bin: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude.bin: Device signature = 0x1e950f
avrdude.bin: NOTE: FLASH memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.bin: erasing chip
avrdude.bin: reading input file "tmp/k4l_keyer.hex"
avrdude.bin: input file tmp/k4l_keyer.hex auto detected as Intel Hex
avrdude.bin: writing flash (24774 bytes):

Writing | ################################################## | 100% 20.71s

avrdude.bin: 24774 bytes of flash written

avrdude.bin: safemode: lfuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude.bin: safemode: hfuse changed! Was da, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude.bin: safemode: efuse changed! Was 5, and is now 0
Would you like this fuse to be changed back? [y/n] m
avrdude.bin: safemode: Fuses OK

avrdude.bin done.  Thank you.

cfowler@compaq-desktop:~/Dropbox/Arduino/src/K4L_Keyer$ ~/Dropbox/Downloads/snoop -b 1200 -s /dev/ttyUSB1
Connected to /dev/ttyUSB1.  Enter Ctrl-\,q to exit.
^Ccfowler@compaq-desktop:~/Dropbox/Arduino/src/K4L_Keyer$ ~/Dropbox/Downloads/snoop -b 9600 -s /dev/ttyUSB1
Connected to /dev/ttyUSB1.  Enter Ctrl-\,q to exit.

^Ccfowler@compaq-desktop:~/Dropbox/Arduino/src/K4L_Keyer$ make upload
#stty -F /dev/ttyUSB0 hupcl
avrdude -V -F -C /etc/avrdude.conf  -p atmega328p -P /dev/ttyUSB0 -c stk500v1  -b 115200 -U flash:w:tmp/k4l_keyer.hex

avrdude.bin: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude.bin: Device signature = 0x1e950f
avrdude.bin: NOTE: FLASH memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.bin: erasing chip
avrdude.bin: reading input file "tmp/k4l_keyer.hex"
avrdude.bin: input file tmp/k4l_keyer.hex auto detected as Intel Hex
avrdude.bin: writing flash (24774 bytes):

Writing | ################################################## | 100% 17.04s

avrdude.bin: 24774 bytes of flash written

avrdude.bin: safemode: Fuses OK

avrdude.bin done.  Thank you.

 



The first time it seems to fail but the second time it works. Still can't do 9600 but the device is up.





       
   
By: Anonymous: linxdev () on Thursday, August 25 2011 @ 02:23 PM PDT  
Anonymous: linxdev

I am so happy. This is fixed!

I'm hoping you can explain technically why.

I have 2 TTL cables. One is a full blown MAX232. The other was designed for ICOM radios. It has both RX and TX on the tip and then ground. So it is a mono 3.5mm. Not knowing how the Arduino would like its TX and RX attached to TIP I chose only to see stuff coming from the chip.

On my GPS I only receive to. So in both cases the RX of the ATMega328 was disconnected.

The test works on the UNO because even if I had only tapped into the TX the RX would have been connected to the USB-TTL chip on that board. I had a hunch and hooked up the RX of my MAX232 to the RX of the ATMega328.

9600 works! No delay!!

Now I want to know why Smile

Chris






       
   
By: Windell (offline) on Thursday, August 25 2011 @ 03:20 PM PDT  
Windell

Well, that's definitely good news. I have not come across this situation before, but I'm very glad that it is working and that you were able to find the cause (if not an explanation).

My initial assessment, without looking into it in great detail: The Arduino serial library sets up an interrupt to detect (and store) incoming data. Something is going wrong in that process if the RX line is not hooked up to anything. You might be able to defeat it by (a) disabling interrupts-- which would also make delay() not work, or (b) hooking that line through a resistor to ground or Vcc.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   



 All times are PDT. The time is now 12:45 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?