From: avr f. <avr...@gm...> - 2008-06-15 18:26:12
|
Hello. I just got it working. But I can't understand one thing. Why do I need faster baud rate in ZTerm compared to Amforth baud rate settings? When Amforth it set to 9600 and ZTerm to 19200. It works. why? I just got my Arduino this week. So I'm learning.. --- Background: This is how I got it working Tools: Mac, VMware Fusion, Studio4.14(589) in WindowsXP, ZTerm on mac Amforth 1. Get amforth compiling clean. (change temp6->zl and temp7->zh) 2. Change ADCaddr -> ADCCaddr 3. Comment out r30 and r31 in macros.asm. 3. Set Baud rate = 9600 4. Change .include to device/atmega168.asm 5. Compile, f7. Uploading hex and eep files. 1. Arduino have a extern crystal. (CKSEL=1111,SUT=00) 2. LFUSE=0xCF, HFUSE=0xDF, EFUSE=0xF8 ( http://palmavr.sourceforge.net/cgi-bin/fc.cgi) 3. LockBit=0xCF Connecting with ZTerm 1. Connect USB cable direct to Arduino 2. Disconnect AVRISP mkII from Arduino 3. ZTerm 19200N81, no local echo, no Xon/Xoff, no Hardware handshake vt100, ZModem protocol for send and receive. |
From: Christian B. <cas...@ca...> - 2008-06-15 18:40:35
|
On Sunday 15 June 2008 20:26:19 avr feedback wrote: > When Amforth it set to 9600 and ZTerm to 19200. It works. why? I guess your Arduino runs at 16 MHz but you told the assembler that your controller is running at 8MHz. |
From: avr f. <avr...@gm...> - 2008-06-22 07:50:35
|
ok. thanks. :)Now I have a harder question. 1. Why is my Arduino losing memory after turning it off. It could also be that the internal state is damage. When I try to connect second time. It's not answering or garbage appear in the terminal. I'm using default fuses. With baudrate 9600. Background: This forth image is based on the svn repository. And uses AVRMacPack to compile. On Sun, Jun 15, 2008 at 8:40 PM, Christian Berger < cas...@ca...> wrote: > On Sunday 15 June 2008 20:26:19 avr feedback wrote: > > When Amforth it set to 9600 and ZTerm to 19200. It works. why? > > I guess your Arduino runs at 16 MHz but you told the assembler that your > controller is running at 8MHz. > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Matthias T. <mt...@we...> - 2008-06-22 20:31:21
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 avr feedback wrote: btw: do you have a more usual name? > ok. thanks. :)Now I have a harder question. > 1. Why is my Arduino losing memory after turning it off. Well, RAM contents is usually lost when the power goes off ;=) > It could also be > that the internal state is damage. What do you mean with "internal state"? There are a few candidates for this label. > When I try to connect second time. It's not answering or garbage appear in > the terminal. I'm using default fuses. With baudrate 9600. What default fuses? Atmel factory defaults or arduino default? If Atmel default, try setting the fuses to maximize the frequency since 1MHz with the internal oszillator is usually non-working setup. If arduino defaults please let us know what they are. My Atmega168 works fine, but is not part of an arduino ... > > Background: > This forth image is based on the svn repository. > And uses AVRMacPack to compile. That should not do any harm since assembly is way too low level for optimizers and friends. br Matthias -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIXraa9bEHdGEMFjMRAtJgAKCkL4A82R/INVipZRXuEHyNzhrJSACgkXMK DHB0nwaZamAH2OJIXEtu/5Q= =bx1h -----END PGP SIGNATURE----- |
From: avr f. <avr...@gm...> - 2008-06-22 22:15:39
|
Ok. First. Thanks for your reply. On Sun, Jun 22, 2008 at 10:31 PM, Matthias Trute <mt...@we...> wrote: > btw: do you have a more usual name? Mat > > 1. Why is my Arduino losing memory after turning it off. > Well, RAM contents is usually lost when the power goes off ;=) ok, What I was trying to say was. It does not answer my usb-serial connection after some disconnects and reconnects. :> It always works after a fresh upload. > > It could also be > > that the internal state is damage. > What do you mean with "internal state"? There are a few candidates > for this label. After power it off and on, 4-5 times strange things happens. After a while. Some garbage character appear. Then some more characters. Usually after a power cycle, trying to bring it back to known state. Then I lose it totally. So my coding session always ends with uploading amforth again. Which is a pain. My wish was to never have to upload amforth again. I can replicate this problem. It always appear when I connect and disconnect with minicom ~4-5 times. The garbage characters reminds me of the garbage I saw when I first had the wrong baud rate. > > When I try to connect second time. It's not answering or garbage appear in > > the terminal. I'm using default fuses. With baudrate 9600. > What default fuses? Atmel factory defaults or arduino default? This is working acceptable, but breaks after reconnecting with mincom (or ZTerm) ~ 4-5. Like described. LFUSE=0x5f HFUSE=0xdf EFUSE=0xf9 > If Atmel default, try setting the fuses to maximize the frequency > since 1MHz with the internal oszillator is usually non-working > setup. If arduino defaults please let us know what they are. I'm trying atmel defaults. I lost my arduino defaults. (What does "Start up time PWRDN/RESET 64K CK/ 14 CK + 4,1 ms" mean? This is kind of cryptic to me.) > > My Atmega168 works fine, but is not part of an arduino ... > > br > Matthias Are you using usb? I'm starting to think it is the usb-serial driver I installed initially. I hope everyone have patience with my knowledge level.(*noob*) =/ /Mat |
From: avr f. <avr...@gm...> - 2008-06-24 19:52:53
|
http://dev.emcelettronica.com/why-avrs-eeprom-will-be-erased-randomly I think I will explain my problem with this article and move on. =/ On Mon, Jun 23, 2008 at 12:15 AM, avr feedback <avr...@gm...> wrote: > Ok. First. Thanks for your reply. > > On Sun, Jun 22, 2008 at 10:31 PM, Matthias Trute <mt...@we...> wrote: >> btw: do you have a more usual name? > > Mat > >> > 1. Why is my Arduino losing memory after turning it off. >> Well, RAM contents is usually lost when the power goes off ;=) > > ok, What I was trying to say was. It does not answer my usb-serial > connection after some disconnects and reconnects. :> > It always works after a fresh upload. > >> > It could also be >> > that the internal state is damage. >> What do you mean with "internal state"? There are a few candidates >> for this label. > > After power it off and on, 4-5 times strange things happens. > After a while. Some garbage character appear. Then some more > characters. Usually after a power cycle, trying to bring it back to > known state. Then I lose it totally. So my coding session always ends > with uploading amforth again. Which is a pain. My wish was to never > have to upload amforth again. I can replicate this problem. It always > appear when I connect and disconnect with minicom ~4-5 times. > The garbage characters reminds me of the garbage I saw when I first > had the wrong baud rate. > >> > When I try to connect second time. It's not answering or garbage appear in >> > the terminal. I'm using default fuses. With baudrate 9600. >> What default fuses? Atmel factory defaults or arduino default? > > This is working acceptable, but breaks after reconnecting with mincom > (or ZTerm) ~ > 4-5. Like described. > LFUSE=0x5f HFUSE=0xdf EFUSE=0xf9 > >> If Atmel default, try setting the fuses to maximize the frequency >> since 1MHz with the internal oszillator is usually non-working >> setup. If arduino defaults please let us know what they are. > > I'm trying atmel defaults. I lost my arduino defaults. > > (What does "Start up time PWRDN/RESET 64K CK/ 14 CK + 4,1 ms" mean? > This is kind of cryptic to me.) > >> >> My Atmega168 works fine, but is not part of an arduino ... >> >> br >> Matthias > > Are you using usb? I'm starting to think it is the usb-serial driver I > installed initially. > I hope everyone have patience with my knowledge level.(*noob*) =/ > > /Mat > |
From: Matthias T. <mt...@we...> - 2008-06-27 20:42:33
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 avr feedback wrote: > http://dev.emcelettronica.com/why-avrs-eeprom-will-be-erased-randomly > > I think I will explain my problem with this article and move on. =/ That could be the reason why I sometimes (ok, nearly every time) see the turnkey action (output of VER to the serial line) whilest flashing a new image. Not that it ever did any harm to my code/hardware, but it is funny to see it at all.... But: you should get rid of your problems by re-flashing the hexfiles a second time. The content of the EEPROM is than correct and the default turnkey action does not change EEPROM content. Another solution would be to flash the eeprom content ahead of the flash content (simply change the order for the avrdude call in the Makefile). Please let me know, if this works. There are a few more possible work-arounds e.g. changing the addresses in the .eseg area, but it is rather difficult since the addresses are hard coded in the coresponding words/*.asm files. Matthias PS: despite the current problems, I made a new release... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIZVC59bEHdGEMFjMRAimwAJ0VHGXKq/FsDZLXOAf9lvCZ/SDPygCgyxno cUIA8xz3moxGrps6yBXqteg= =8e9j -----END PGP SIGNATURE----- |