Re: [Flashforth-devel] Arduino Classic character LCD display drive
Brought to you by:
oh2aun
From: Christopher H. <chr...@li...> - 2021-04-22 18:50:31
|
Hi, for the legally aware: are you treating this as "trivial code", or did you want to attach a license to it? For the small size of the project, Apache 2.0 might be appropriate: https://www.apache.org/licenses/LICENSE-2.0.html Christopher Howard -----Original Message----- From: craig bair via Flashforth-devel < fla...@li...> Reply-To: craig bair <dab...@ya...> To: fla...@li... Subject: [Flashforth-devel] Arduino Classic character LCD display drive Date: Thu, 22 Apr 2021 17:39:11 +0000 (UTC) Hi there. Wow, and I thought I tried to do crazy stuff in FlashForth... Recursion? I've landed in a pile of classic Arduinos and been asked to come up with some I2c based programs for sensor simulation and production board testing. Having little or no regard for the 'Duino psudeo-C and its environment and performance, of course I turned to FlashForth. I'm happy to report that a wide spectrum of Mega2560, UNO-r3, and Pro-Mini versions all seem to run the "FlashForth 5 ATmega328 18.11.2020" and "FlashForth 5 ATmega2560 18.11.2020" hex binaries just fine for me so I haven't had to try recompiling (grin). I can also report that the i2c-base-avr performs well at reading the SHT31 temperature/humidity sensors, but since there's only a polled master mode, I'm trying to port the TWI_Master/Slave Interrupt code out of C. I'll let you know how that goes. What I discovered along the way was that the mt128.fs code, as elegantly opaque as it looks, probably won't work for driving the 16x2 char LCD displays that I've got laying around. The ATmega328 doesn't even have 8 pins in PortC. Neither the UNO or the ProMini have a port with 8 pins that are free to use unless one feels like stealing the UART pins from PortD. It seemed reasonable to shoot for compatability with the old LCD-Keypad Shields so I took a Sainsmart v1.0 as my guide but ignored the buttons and gave the R/W line a pin in case I wanted to read back from it. (People have been known to steal the unused display ram for temporary storage in a pinch.) Not feeling comfortable with AVR assembler yet, I rewrote it in more conventional forth. It's not as sophisticated as what I did in one of the Pic18 projects, but is a good functional starting point for this class of display. Feel free to have your way with it if it's useful to you and post any problems you have with it. I make no claim of having torture-tested every possible thing that can be done to it. Enjoy. craig bair_______________________________________________Flashforth-devel mailing lis...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel |