Hi all,
I'm currently in the process of building sort of a hand-held serial terminal to drive an RS232 receipt printer.
It uses a 4x4 keypad matrix, piezoelectric beeper, HD44780 16x2 LCD, drives a relay and also will end up talking to an 08M all on the same board.
Initially I decided on purchasing a 20M to do this job. It has lots of inputs and outputs so it looked like a good candidate.
After I managed to write successful routines for the keypad and buzzer, I started working on writing to the LCD.
And that was a week ago.
I've probably spent about 20 hours on it so far and I couldn't work it out.
I tried the circuits described all over the internet how to do this, but to no avail.
So I tried adding in a shift register and trying some of those circuits.
Still no luck.
I have finally worked it out.
The EEPROM command does not work on my 20M picaxe chips!!!
(I bought two, one for just in case, or for a later project that might need it)
When I quiz the firmware on the 20M they both report
Firmware Version 3.A
(Picaxe-28 Firmware version A)
So to test my theory about the EEPROM command I wrote the following code:
This tests as expected in the simulator ok. But if you program the Picaxe-20M, b0 - b13 are loaded with 01, the same as the memory locations!
So to make sure I was using the command ok, I did the same with an 08M
Firmware Version 9.2
(Picaxe-08M Firmware version 2)
That works fine.
The right numbers are in the registers and in the correct memory locations.
I've been beating my head against a wall for the last week thinking that I'm a total plonker that can't wire up a circuit right and interfacing LCDs with Picaxe isn't as easy as it looks.
The reason I narrowed it down to this is because all the code for LCDs uses the Picaxe's Memory.
It's the bloody chips fault!
What the hell is going on here?
Jamie
I'm currently in the process of building sort of a hand-held serial terminal to drive an RS232 receipt printer.
It uses a 4x4 keypad matrix, piezoelectric beeper, HD44780 16x2 LCD, drives a relay and also will end up talking to an 08M all on the same board.
Initially I decided on purchasing a 20M to do this job. It has lots of inputs and outputs so it looked like a good candidate.
After I managed to write successful routines for the keypad and buzzer, I started working on writing to the LCD.
And that was a week ago.
I've probably spent about 20 hours on it so far and I couldn't work it out.
I tried the circuits described all over the internet how to do this, but to no avail.
So I tried adding in a shift register and trying some of those circuits.
Still no luck.
I have finally worked it out.
The EEPROM command does not work on my 20M picaxe chips!!!
(I bought two, one for just in case, or for a later project that might need it)
When I quiz the firmware on the 20M they both report
Firmware Version 3.A
(Picaxe-28 Firmware version A)
So to test my theory about the EEPROM command I wrote the following code:
Code:
eeprom 0,($30)
eeprom 1,($31)
eeprom 2,($32)
eeprom 3,($33)
eeprom 4,($34)
eeprom 5,($35)
eeprom 6,($36)
eeprom 7,($37)
eeprom 8,($38)
eeprom 9,($39)
eeprom 10,($3A)
eeprom 11,($3B)
eeprom 12,($3C)
eeprom 13,($3D)
read 0,b0
read 1,b1
read 2,b2
read 3,b3
read 4,b4
read 5,b5
read 6,b6
read 7,b7
read 8,b8
read 9,b9
read 10,b10
read 11,b11
read 12,b12
read 13,b13
debug
So to make sure I was using the command ok, I did the same with an 08M
Firmware Version 9.2
(Picaxe-08M Firmware version 2)
That works fine.
The right numbers are in the registers and in the correct memory locations.
I've been beating my head against a wall for the last week thinking that I'm a total plonker that can't wire up a circuit right and interfacing LCDs with Picaxe isn't as easy as it looks.
The reason I narrowed it down to this is because all the code for LCDs uses the Picaxe's Memory.
It's the bloody chips fault!
What the hell is going on here?
Jamie
Last edited: