From: <an...@ki...> - 2010-05-21 09:05:40
|
OK on the notes below. Matthias Trute wrote: > Andy, > >> Compilation is fine except for a single warning:- >> >> C:\Documents and >> settings\andy\Desktop\forthduino_3.8\core\devices/atmega1280.asm(192): >> warning: .cseg .db misalignment - padding zero byte >> > > Just add a space to your mcuname string. It's not crtical however. > >> At the moment I am considering the list below. >> fixed this. >> 1. I missed tweaking something in the code as it comes, Mathias >> suggested using polled serial comms instead of ISR's. Do I need to >> tweak something to make this so, or does it do it already? There may be >> no response from the serial link but the board may actually be running. >> > > I just reviewed the template application files. They use the > poll based words now. Maybe the commit diffs that can > be viewed at > > http://amforth.svn.sourceforge.net/viewvc/amforth?view=rev&revision=860 > > are helpful as well. > Ah so, the interupt flag was'nt commented out in my template. Sorted now. >> 2. I have got something wrong with the fuses and addresses etc and the >> board just is'nt running. Programing all verifies etc and is done from >> AVR Studio, 4.18 with an AVR ISP Mk2. >> >> BOD, Disabled >> SPI, Enabled >> Boot Flash 4k, start $F000 (to match .equ max_dict_addr = $F000) >> Full swing osc , slow rise time with max delays >> > > That is probably wrong. Just set the fuses to the factory defaults _and_ > change the osc settings _only_ . The boot fuses are not relevant here. > sorted I assume though that >> Boot Flash 4k, start $F000 (to match .equ max_dict_addr = $F000) is correct though, or is it ?? >> 3. I have got something wrong with the hardware defs or the tweaks to >> the app asm file and the code just is'nt running, crashed. >> > > You defined the usart3 as your terminal IO port. Is that really really ok? > I had that kind of error more than often, stupid thing that. > >> To help with the debugging, I need to turn on the debugging LED that is >> connected to port B7. >> >> Where and how is best to place the code? >> > > An LED is not that useful. Place a piezo there instead. Than you > can hear the controller working. The LED may only dim. A piezo would work, the board already has an LED though (All Arduino Megas do) and no piezo, once I have a pin toggling I usually hook up my oscilloscope so I can see what is happening and do some easy timing calculations etc. On the Arduino Mega the debug LED's port is also brought out to an external connector. This makes life real easy. > > I usually use the pause word to toggle the IO port, than I can hear > that the controller does nothing but waiting for a keystroke. Another > place would be the DO_NEXT label, but here you may need to > put an count down as well since the inner interpreter is called > very often (ultra sonic frequencies usually). > > Hmm a scope it is then, my hearing is very poor in the ultrasonic <|;) >> Whilst ultimately blinking would be nice for now I am happy with turn >> the LED on. >> >> I am not really looking for someone to do this for me here, just point >> me in the right Amforth compatible direction. >> > > There is no such "amforth compatible direction" thing at all. That's reassuring to know. I think I want to keep this to the templates and board specific bits though. Rather than mess with the code that is common to all. > > Good luck > Matthias > > ------------------------------------------------------------------------------ > > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > I will probably need it, of to play some more. Thanks for the quick response, and guidance, much appreciated. Hopefully disabling the UART interrupt flag and the above will be enough. Cheers |