From: Erich W. <ew....@on...> - 2008-03-02 15:31:28
|
Hi Matt, Matt Eastburn wrote: > > I am using a atmega8L (at 5volts). 8MHz Crystal. 9600baud. > > As mentioned in my first post i get the exact same hardware to work when > compiling C to it. To summarize: 1. you can transfer a program to the controller. I suppose, you use the same tools/programmer for a. the compiled C Programm and b. the "compiled" amforth system. Can you reread the program from the compiler and compare that to the original file? 2. The amforth system depends on a small second file (*.eep.hex). This file is only 12 byte, but it must be transfered into the controllers eeprom. It stores a few important things for internal use of the amforth system. Just to make sure, you did transfer that as well, right? If you did not, the amforth system cannot start. 3. fuse bits. The fact, that you can successfully transfer and run a compiled C program, seems to suggest, that it is not a problem with the fuse bits. I do not use AVR Studio, but I expect that there is some "menu", which says something like "set fuses" or "set fuses/locks". Then I expect a panel with a list of "bits" to select, with strange names like BODLEVEL, BODEN (brown out detection enabled), CKSEL0..3 to select the exact clock source. In theory, a brandnew controller runs on its internal RC oscillator at something like 125 kHz, but again, the fact that your C program works, seems to suggest that the fuses are set ok. > I do unplug the programmer - but it does not help. > > Now as for the fuse bits - this is where i could be going wrong. because I > dont really know how or what to set them to. > > I just use AVR Studio to compile the asm files then program the chip. but > dont know what to set the fuse bits to - or where i can set them. see above. 4. Again, let me recommend to test lower baud rates. Good luck, Erich |