From: Kalus M. <mic...@on...> - 2010-03-16 19:04:23
|
Hi MIke. Am 16.03.2010 um 16:31 schrieb Mike Beach: > .. I'll have a look at your posts, and take the LCD and ADC as a bit > of a challenge. For this project though, I'm expecting to use a > separate 20x4 LCD, and > external ADCs via a cable. May be you want to take a look at lcd.frt and lcd.asm. That worked fine in earlier versions of amforth and did well in amforth-3.9 recently. You may chose to include lcd.asm while assembling, or use lcd.frt later to download forth code to a running amforth system on the butterfly. I created this while using the polling i/o method for the USART, so the anforth system tolerated the redirection of the EMIT vector (see: source code lines 89,90) to send strings to the LCD: : <lcd> ( -- ) lcdcr ['] lcdemit is emit ; : </lcd> ( -- ) tob wlcd ['] tx0 is emit ; But using the (default) interupt driven i/o method for EMIT, amforth will crash as son as you try to execute <lcd>. So you can not use ldc. or lcd" from the shelf if you use the interupt i/o. May be you find a way to work around this and improve the code to fit both ways to handle the terminal i/o. Michael |