Sun Dec 14 15:40:53 CET 2008

Preparing for dorkbot

This works on my first 452 proto A/V proto board:
  staaplc -u -d pk2 452-40.f

But, the synth boards don't work.  They are running at 8 Mhz, maybe
it's too fast?  Let's lower the baud rate.

2400 doesn't work either.. It's probably something else..

I forgot how to load a forth file into the scheme console, so the asm
can be inspected.  OK: using
  (require (planet zwizwa/staapl/prj/pic18))

instead of
  (require (planetzwizwa/staapl/pic18))

The other option is to use the former, then run (init-namespace).

- baud rate was hardcoded
- 40Mhz goes up to 19200
- 8Mhz goes up to 4800

Look into this better: this probably due to start bit timing issues.

NEXT: load the whole synth in the app. OK.

Now, running the synth app.

NEXT: fix problem with ICD2 port being shut off.

Ok. not initializing the digital inputs seems to work.  Now there's a
problem when turning the synth engine on: this messes up busy-loop
timing.  Maybe the serial busyloop should disable interrupts?
Disabling the engine during command interpretation is probably

Another option is to tie the bitbanged serial port to the interrupt
routine, and use the main timer for bitbanged receive.

The same problem is going to occur for ForthTV, so lets fix it
properly.  We need to poll for the start bit, disable the engine and
then fall into receive.  Is it ok to remove polling the start bit
TRANSITION in receive?