Program LCD HD44780 with 68HC11 in Handyboard

Hello,

for a school project i need to program the Motorola 68HC11 to use the HD44780 LCD controller, and this must be done in C lang plus maybe a bit of assembly. The 68HC11 uC is embedded in a HandyBoard

formatting link

The Handyboard gives the following problem:

The Handyboard has different modes, Expanded mode and Singe chip mode. In Expanded mode the peripheral databus is connected to the external ram. The same databus which connects the uC to the LCD. In Single chip mode the uC is connected to the LCD but the external cannot be reached. In fact, as far as the 68H11 is concerned, there is no external memory anymore. So it can no longer execute a program from its external RAM. It only can use its internal RAM.

So the solution must something like this:

- Start in Expanded mode and launch main program.

- Copy LCD-program from external to internal RAM (routine that includes initialisation).

- Switch to Single chip mode.

- Execute LCD program which initializes the LCD

- Switch back to Expanded mode

- Copy the string or char I want to print to the internal ram.(Method with parameter?)

- Switch to Single chip mode

- Write string or char to LCD

- Switch to Expanded mode.

- Continue with main.

The problem is that i dont know how to send the LCD program to the internal RAM when I'm in Expanded mode.

So the question is: "How do I load a piece of the C code, which includes the initialisation and later the function with parameter, into the internal ram?

I hope you understand my problem! If not, please tell me and i will try to clear things out.

Thanks in advance :)

P.S. I'm dutch so my english is not fluently, sorry for that

Reply to
r_spaargaren
Loading thread data ...

Firstly have a look at the schematic and see how the MODB pin is connected, then read the HC11 manual to see what this means. Once you have understood the meaning of "Special MCU Operating Modes", you can rethink your proposal.

It would also be a good idea to look at the extensive range of software examples at the URL you gave us.

--
John B
Reply to
John B

Hi,

Instead of connecting your HD44780 to the external databus, consider a display connection, where your 68HC11 is running in single chip mode and you emulate the RS, R/W and E signals and the 8 bit databus, using a byte port for the databus and three bit ports for RS, R/W and the E signals.

It is slightly less efficient than using an external data bus, but easier to handle, eg.:

void wr_disp( unsigned char rs, unsigned char val ) { RS = rs; RW = 0; DISPDATA = val; E = 1; E = 0; }

Reply to
aheadcon

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.