I'm using this board from Atmel (see attached jpg) the crystal is marked as 11.0592 The chip (removable) was originally clocked at 1MHz (internal default clock). CLKSEL = 1111 is it correct for this frequency?
I'm not using any IDE, just avrasm2.exe called from a makefile. ____________________________________________________ # Name of your application (useful, if you rename template.asm) TARGET=atmega16 MCU=atmega16 # programs / flags AMFORTH=../amforth-5.3/core DIR_ATMEL=../AvrAssembler2 AVRASM=$(DIR_ATMEL)/avrasm2.exe -I $(DIR_ATMEL)/Appnotes # ---------------------------------------------------------- INCLUDE=-I $(AMFORTH) -I $(AMFORTH)/devices/$(MCU) $(TARGET).hex: $(TARGET).asm $(AMFORTH)/*.asm $(AMFORTH)/words/*.asm $(AMFORTH)/devices/$(MCU)/*.asm $(AVRASM) $(INCLUDE) -fI -v1 -e $(TARGET).eep.hex -l $(TARGET).lst $(TARGET).asm ___________________________________________________ But the serial still doesn't work!! :( Paolo -----Messaggio originale----- From: avr feedback Sent: Tuesday, May 27, 2014 2:00 PM To: Everything around amforth Subject: Re: [Amforth] No serial connection Do research on F_CPU. Clock frequency will have impact on Baud rate. To me it looks like atmega16 should have 8000000 or 16000000. If you are unsure of lock and fuse values in your Atmel Studio 4, you can read them from your chip before you program. Read button first and then click program. But as soon you got everything working, you want to move out from the IDE world into Makefiles. On Tue, May 27, 2014 at 12:07 PM, Paolo Garro <paolo.ga...@fastwebnet.it>wrote: > I successfully compile amforth for atmega16 and programmed my > board (Atmel mega16 mini) with hex+eep files. > > Now I'm in trouble with the serial connection. > Here is my simple template.asm: > _____________________________________________ > ..include "macros.asm" > ..include "device.asm" > > ..equ TIBSIZE = $64 > ..equ APPUSERSIZE = 10 > ..equ NUMWORDLISTS = 8 > > ..equ F_CPU = 11059200 > > ; terminal settings > ..set WANT_ISR_RX = 1 > ..set WANT_ISR_TX = 0 > ..equ BAUD = 38400 > ..include "drivers/usart.asm" > > ..set rstackstart = RAMEND > ..set stackstart = RAMEND - 80 > ..equ AMFORTH_RO_SEG = NRWW_START_ADDR > > ..include "amforth.asm" > ____________________________________________ > > Setting my PC terminal to 38400, 8N1, no flow control > I only receive sequencies on NULL char. > [00][00][00][00][00][00][00][00].... > > I set the SUT fuse to 11 (max startup time) and CLKSEL = 1111, is this > right? > Any hint? > > Paolo > > > --- > Questa e-mail è priva di virus e malware perché è attiva la protezione > avast! Antivirus. > http://www.avast.com > > ------------------------------------------------------------------------------ > The best possible search technologies are now affordable for all > companies. > Download your FREE open source Enterprise Search Engine today! > Our experts will assist you in its installation for $59/mo, no commitment. > Test it for FREE on our Cloud platform anytime! > > http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amforth-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amforth-devel > ------------------------------------------------------------------------------ The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime! http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel --- Questa e-mail è priva di virus e malware perché è attiva la protezione avast! Antivirus. http://www.avast.com ------------------------------------------------------------------------------ The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime! http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel