It's a good result.. Now you mention the display, I have a "looks familiar" display, not used for 15 years cos too many wires and thought to convert to serial with a mcp expander which is a nice chip to use. I know these displays are slow and think why bother...I use glcd displays with gcb..they are nice, with graphics. It was a thought.
I got the picaxe serial mp3 player working with gcb no prob but no picaxe chip interface was involved just send bytes.
Happy trails
I have a more modern version lcd, but can't find it. you know
PS I think there's other ways to use these lcds using shift register chips but for cost?
This info should be in the help with emphasis on polarity as rs232 is "something everyone understands", not so...I never used rs232 until I used it to program picaxe and it worked with 2 resistors...scientific explanation. It's supposed to just work but this lcd query says otherwise.
Good explanation of serial issues/useage Chris Roper.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Chris, thanks. It works now on hardware UART and without the extra transistor.
I can send text to the LCD by introducing a delay between bytes.
However, the bigger problem remains that for debugging I want to show the content of variables. If the value is more than 9 (more than 1 digit) the HSerPrint sends too short pauses between digits. Is there a command to increase that pause?
Johan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have this to come,ha. Is it serprint str(var)? I dunno. rs232 It worked for me with picaxe mp3 player
don't say you got to break down a var to chr$ and send each..no way
Last edit: stan cartwright 2018-01-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Stan, yes sending a variable to the LCD after breaking it down does work.
I did it like this:
sub PrintLCD (Value)
HSerPrint Value/100
Wait 5 mS
Value = Value - ((Value/100)*100)
HSerPrint Value/10
Wait 5 mS
Value = Value - ((Value/10)*10)
HSerPrint Value
Wait 5 mS
end sub
The value wil be printed on the LCD with 5 mS pause between digits.
The Picaxe LCD accepts it.
Johann
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Interesting topic this. Is this in latest gcb 98.01 help/demos...somewhere not obvious to me? http://www.circuitvalley.com/2011/12/two-wire-serial-lcd-16x2-graphics.html
or anything similar
edit I mean if the circuit works, what/how do I address the display? it's a 2 lots of 4 bits send I think...hence my asking out of not knowing stuff. and to think I programmed this display once in asm, sad
Last edit: stan cartwright 2018-01-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The hardware is a standard LCD. Can be up 8x1, 16x1,16x, 40x2 or 40x4.
The microcontroller is any PIC with sufficient memory.
The connectivity between the microcontroller and the PIC is an 8 bit bus.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, thanks.
To sum it up:
connect the Picaxe LCD module to the serial hardware port of the PIC (Pin 7 in case of the 12F1840, which is PortA.0)
Enter these settings:
'USART settings
#define USART_BAUD_RATE 2400
#define USART_TX_BLOCKING
#define USART_DELAY 5 ms
SCKP = 1 ' Invert Tx Bit
Now HSerPrint and HSerSend work as usual.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
subCursor(Line,Position); position cursorHSerSend(254)Wait5mSSelectCaseLineCase1Position+=127HSerSend(Position)Case2Position+=191HSerSend(Position)Case3Position+=147HSerSend(Position)Case4Position+=211HSerSend(Position)caseelseendSelectWait5mSendsub
Last edit: JohanDenRidder 2018-01-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you probably no longer need all the 5ms delays you have scattered in the
code.
On 29 January 2018 at 21:36, JohanDenRidder <hendriksx@users.sourceforge.net
wrote:
These two subs will also be useful:
sub CLS
; clear display
HSerSend (254)
Wait 5 mS
HSerSend (1)
Wait 5 mS
End Sub
sub Cursor (Line, Position)
HSerSend (254)
Wait 5 mS
Select Case Line
Case 1
Position +=127
HSerSend (Position)
Case 2
Position +=191
HSerSend (Position)
Case 3
Position +=147
HSerSend (Position)
Case 4
Position +=211
HSerSend (Position)
case else
end Select
The picaxe display is in gcb lcd solutions. Would the gcb one wire lcd work with this..as the delays seem different. What does the rc network do,add another delay? https://www.romanblack.com/shift1/shift1c.gif
edit meaning a bog standard display in photos I posted earlier in this topic.
Last edit: stan cartwright 2018-01-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Chris,
Yes, in the previous post you can see I did use that line. It solved the LCD timing issue.
Only for these two subs that I showed, where special functions of the module are called, I needed an extra delay to get it to work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Question. Was this an AXE033 LCD? If so, I have developed an alternative firmware for the device many years ago. The firmware is written in Great Cow BASIC and can therefore be a plug in replacement for the existing microcontroller.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It works. A bit slow but that's ok.
I am not sure what is standard though, high pulses or low pulses?
The other reason for not communicating was timing. I wouldn't bet on Picaxe for that...
It's a good result.. Now you mention the display, I have a "looks familiar" display, not used for 15 years cos too many wires and thought to convert to serial with a mcp expander which is a nice chip to use. I know these displays are slow and think why bother...I use glcd displays with gcb..they are nice, with graphics. It was a thought.
I got the picaxe serial mp3 player working with gcb no prob but no picaxe chip interface was involved just send bytes.
Happy trails
I have a more modern version lcd, but can't find it. you know
PS I think there's other ways to use these lcds using shift register chips but for cost?
Last edit: stan cartwright 2018-01-26
I just found that by using SerPrint in stead of HSerPrint it is possible to invert the serial signal, thus eliminating the need for a transistor:
I tried it and this works.
Thanks for the help.
Regards,
Johan
Did you see my earlyer post about how to do the same with HSerPrint?
~~~
SCKP = 1 ' Invert Tx Bit
~~~
SCKP is an abreviation of Synchronus Clock Polarity but it works becouse in Asynchronus mode the Tx Pin is the same as the Clock pin.
So you are not forced to use soft serial to invert, you can alocate serial to the hardware and use the CPU for other things.
Chrees
Chris
Hi Chris, I see now I missed your earlier post, because of switching to the second page of this thread.
I'll try tomorrow, thanks.
Last edit: JohanDenRidder 2018-01-26
No Library needed it is part of the built in functions.
It may sacrifice portability, however, as it is directly setting a register
bit in the EUSART.
This info should be in the help with emphasis on polarity as rs232 is "something everyone understands", not so...I never used rs232 until I used it to program picaxe and it worked with 2 resistors...scientific explanation. It's supposed to just work but this lcd query says otherwise.
Good explanation of serial issues/useage Chris Roper.
Chris, thanks. It works now on hardware UART and without the extra transistor.
I can send text to the LCD by introducing a delay between bytes.
However, the bigger problem remains that for debugging I want to show the content of variables. If the value is more than 9 (more than 1 digit) the HSerPrint sends too short pauses between digits. Is there a command to increase that pause?
Johan
Try #define USART_DELAY
That will introduce a 1ms pause between chracters.
So the test code will now be:
Cheers
Chris
Last edit: Anobium 2018-01-28
I have this to come,ha. Is it serprint str(var)? I dunno. rs232 It worked for me with picaxe mp3 player
don't say you got to break down a var to chr$ and send each..no way
Last edit: stan cartwright 2018-01-27
Stan, yes sending a variable to the LCD after breaking it down does work.
I did it like this:
The value wil be printed on the LCD with 5 mS pause between digits.
The Picaxe LCD accepts it.
Johann
actually you can define longer delays using this statement.
The default is 1 ms.
try #define USART_DELAY 5 ms
BR
M
I will try that. Will be much easier than my work around.
Interesting topic this. Is this in latest gcb 98.01 help/demos...somewhere not obvious to me?
http://www.circuitvalley.com/2011/12/two-wire-serial-lcd-16x2-graphics.html
or anything similar
edit I mean if the circuit works, what/how do I address the display? it's a 2 lots of 4 bits send I think...hence my asking out of not knowing stuff. and to think I programmed this display once in asm, sad
Last edit: stan cartwright 2018-01-28
See https://m.youtube.com/watch?v=0VAklkWtPiM
A much improved solution.
Very interesting display. Do we have details (source, hardware)?
Johan
The hardware is a standard LCD. Can be up 8x1, 16x1,16x, 40x2 or 40x4.
The microcontroller is any PIC with sufficient memory.
The connectivity between the microcontroller and the PIC is an 8 bit bus.
mmotte you made my day, thanks.
5 mS did the trick, the Picaxe display is now fully compatible with HSerPrint.
Good job! Interfacing to legacy equipment can be time consuming but Great Cow BASIC is flexible enough to make that Picaxe display work. :-)
Yes, thanks.
To sum it up:
connect the Picaxe LCD module to the serial hardware port of the PIC (Pin 7 in case of the 12F1840, which is PortA.0)
Enter these settings:
These two subs will also be useful:
Last edit: JohanDenRidder 2018-01-29
With the line:
define USART_DELAY 5 ms
you probably no longer need all the 5ms delays you have scattered in the
code.
On 29 January 2018 at 21:36, JohanDenRidder <hendriksx@users.sourceforge.net
The picaxe display is in gcb lcd solutions. Would the gcb one wire lcd work with this..as the delays seem different. What does the rc network do,add another delay? https://www.romanblack.com/shift1/shift1c.gif
edit meaning a bog standard display in photos I posted earlier in this topic.
Last edit: stan cartwright 2018-01-30
Chris,
Yes, in the previous post you can see I did use that line. It solved the LCD timing issue.
Only for these two subs that I showed, where special functions of the module are called, I needed an extra delay to get it to work.
Question. Was this an AXE033 LCD? If so, I have developed an alternative firmware for the device many years ago. The firmware is written in Great Cow BASIC and can therefore be a plug in replacement for the existing microcontroller.