Hello Stephen,

welcome to the list!

Stephen Simmons <deeps...@gmail.com> writes:

> I have been trying to get the 644P  'sanguino' to build and run, but it
> never initializes uart0 properly. Leaves out the initialization of the
> UBRR.  The baud rate is defined in the INC.

Well, the 644 has *two* serial interfaces, so one thing could
be, that you have included the wrong definition file. I do use
644PA all the time. I have a definition file for 644P somewhere,
but I need to look for it.

Another common error is the clock frequency. There is the what
the crystal has printed on. And then there are a few fuse bits,
which can make life miserable:
- there is a bit to use the internal RC oszillator at 1 MHz
  iirc.
- there is a bit to divide clock by 8 or maybe it was uart
  clock??? But configuring baud rate/8 on your terminal might
  help.

I'll check for the configuration I use over the weekend.

> ... I have been working with AVR for well over 20 years.
It's probably something minor. And you probably checked all of
the above.

> So, then I tried the UNO.hex and UNO.eep.hex on the Microchip ATmega328PB
> from the arduino directory.  It appears the PB is not compatible with the
> UNO (I don't have another option).  While it does run after any definition
> it tends to stop responding/hangs (for a bit).  For example:
>
>
> *amforth 6.9 ATmega328P Forthduino> 3 4 + .7  ok> : x2 dup + ;  ok> 2 x2 .*
>
> *amforth 6.9 ATmega328P Forthduino> 2 x2 .amforth 6.9 ATmega328P
> Forthduino> 3 4 + .*
>
> As you can see I get the banner and a prompt.  Operations like add work
> until a definition, such as, x2.  All seems fine after the 'x2' definition,
> but any attempt to use it fails.  Using the definition of x2 will cause the
> banner to reappear after several seconds. Trying to print from the top of
> the stack also causes a new banner.  The only way to recover is a
> reset/power cycle.  The EEPROM no longer matches the original UNO.eep.hex
> file (not sure if this is normal or not)..
>
> I will continue to work things, I want to eventually augment my engine
> control unit with an ATmega64M1 via CAN.  I have an extensive amount of CAN
> related software and peripherals that I would like to interface with FORTH.
>

I would not expect the prebuilt uno.* files to work on a 328P_B_
--- something I have not heard about before.


> Any hints or suggestions would be appreciated.

Cheers,
Erich

-- 
May the Forth be with you ...


_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to