Go Down

Topic: bitlash + Normal Hitachi HD44780 Compatibe LCD (4x20) + PS2 Keyboard (Read 973 times) previous topic - next topic

muessigb

Hello together.
I'm working on a little bitlash based computer using arduino uno bootloaded atmega328pu.
Does anyone knows how to modify bitlash, so it will work together with the Keyboard and the LCD

billroy

I am the author of Bitlash and would be glad to help.

To integrate the keyboard input, send each character your keyboard driver receives to the Bitlash "doCharacter(char c)" routine.

To integrate the display output, you can use "setOutputHandler(&yourDisplayHandler);".  This redirects all of the Bitlash serial output to the function you specify.  Output is sent one character at a time.  The loudbitlash example shows a simple case using setOutputHandler.

Hope that is helpful, and good luck with your project,

-br


maddog2201

Hey, I'm new to coding, arduino and bitlash, is there any chance you could simplify that?  I'm interested in getting my LCD to work with bitlash, I just can't wrap my head around the setOutputHandler

billroy

The setOutputHander() function tells Bitlash: "Here is the function you should use to print an output character."  You pass it a function that takes a single character as an argument.  Your function takes the character and does whatever you like with it: print it to an LCD, send it over the internet, save it to EEPROM, whatever.

There is an example showing how to use setOutputHandler in the "loudbitlash" example folder.  The example simply makes every printed character uppercase.  Instead, you could replace the uppercasing code with code to print to your lcd.

There is also a serial LCD example that may be more appropriate for the topic of this thread.

Have a look at the examples and see if that helps puzzle it out.

-br
http://bitlash.net

maddog2201

Thanks for the reply, I will be sure to check that out, I'll get back in contact if I have anymore issues.  Thanks

Go Up