Thursday, 2 April 2009

Offshore AVR Programming

Early tomorrow morning I'll be leaving for the Isle of Wight where I'm hoping to find time for some AVR programming between visits to the beach, Carisbrooke Castle and the geology museum!

Unfortunately I haven't found a book on AVR assembly language so I'll be working from a few handwritten notes. The plan is to implement an interactive Forth for the Arduino microcontroller.

The Arduino bootloader makes this awkward by not allowing user programs to write to flash memory. At the moment I'm considering the following options:
  • no bootloader, Forth runs directly on the microcontroller
  • search for an alternative Arduino bootloader
  • rewrite the bootloader to include the required functionality
My AVR Forth will include the following features:
  • ANS 94 Standard CORE and CORE EXT words
  • AVR stack used for Forth's data stack in SRAM
  • a register used for Forth's return stack in SRAM
  • top of stack held in a register
  • direct threaded code
Is there any benefit to holding the top of the return stack in a register?

If you see me on the beach next week puzzling over a notepad and surrounded by scraps of paper, come and say hello. I might even buy you an ice cream!

Wednesday, 11 March 2009

Pictures of my new Arduino Duemilanove

Arduino Duemilanove Microcontroller
Reverse of the Arduino Duemilanove

Tuesday, 10 March 2009

Arduino Assembly Language Tutorial

I've just downloaded Gerd's AVR assembler and a PDF of the Beginner's introduction to AVR assembler language. At the moment I'm reading through the assembly language tutorial in preparation for my Arduino Duemilanove arriving (hopefully tomorrow).

There's one possible problem. I might need to rewrite the boot-loader to allow my programs to write to the inbuilt flash memory. Otherwise, writing an interactive Forth could be pretty tricky!

Unfortunately, reprogramming the Arduino bootloader requires another part.