how to remove clock from axe033

Diesel62

New Member
Hello
Can anyone help please ,I am trying to remove the digits from the second line of the axe033 lcd screen.
I have got top line working fine ,I cant seem to find the answer in the manuals.
thanks
 

westaust55

Moderator
First get an oxy-acetelene set, cold chisel and hammer . . . .

Okay down to business . . .

Could be that you have the CLK link in place on the AXE033 board
In that mode the AXE033 ignores all serial or i2c comms, displays the pre-defined message 1 on the top line and the time/date on the bottom line.


You say you have the top line working.
Is that displaying just pre-defined message No 1 or are you able to print any text you like to the top line whiel the time/date is "fixed" on the bottom line?

Suggest that you post your program code and/or give us a bit more information about how is it connected and what you are doing so we can better consider your problem.
 
Last edited:

Diesel62

New Member
Yes can read adc to screen top line and display adc input.power j2 and rst are bridged.
I have no clk chip or battery fitted. clk terminals are not bridged.
In the instructions it tells me how to clear screen (254,1) but clock 00/00/00 00:00 appears to be preset
 

Attachments

Diesel62

New Member
`picaxe 08m temp and rpm warning


high 2 'set warning LED on for test
Pause 2500
low 2 'turn off warning LED
symbol lm0 = w0
symbol lm1 = w1
symbol ADVal = w4



main:
'''''''''TEMPERATURES SECTION''''''''''
if w2<w1 then
w2=w1
endif
if w3<w0 then
w3=w0
endif
lm0 = 0 'set temp sender value to 0
lm1 = 0 'set rpm to 0


'READ temperature on ADC1


w5 = 0
For w5 = 1 to 2 'read values and send average value to lm0
ReadADC 1 , ADVal
lm0 = lm0 + ADVal
Next
ADVal = lm0 / 2 'average readings
lm0 = ADVal * 4 ' math to convert the output into degrees
adval = 0 'reset adval to use later

'READ revolutions on ADC4
w6 = 0
For w6 = 1 to 2
ReadADC 4 , ADVal
lm1 = lm1 + ADVal
Next
ADVal = lm1 / 2 'average
lm1 = ADVal * 400

adval = 0

init: pause 500
SerOut 0, n2400, (254,128,"CHT",254,132,#w0,"" ) 'pin7 output to LCD, 2400baud.
pause 10
serout 0, n2400, (254,192,"RPM",254,196,#w1,"")
pause 10


if pin3 = 1 then readmax


if lm0 > 250 then goto lighton 'if cylinder head temperature is greater than 250 then light the warning LED, otherwise...
if lm1 > 15000 then goto lighton 'if rpm is greater than 300 then light that warning LED.
if w0 < 225 then goto lightoff
goto main

READMAX:


serout 0,n2400,(254,128,"MAX TEMP",#w3,"")
pause 10
serout 0,n2400,(254,192,"MAX RPM",#w2,"")
pause 10
if pin4 = 1 then readmax

lighton:
high 2

goto main

lightoff:
low 2
goto main
 

BeanieBots

Moderator
First thing when fault finding is to eliminate all else.
So for now, forget your code and concentrate on just the display.
(BTW, I don't think there is anything wrong with your code.)

Try this:-

Symbol LCD=0
Symbol Bd=N2400

serout LCD,Bd,(254,1) 'reset + clear LCD
Pause 1000 'wait for it to reset

serout LCD,Bd,(254,128,"0123456789ABCDEF") 'should appear on top line
serout LCD,Bd,(254,192,"FEDCBA9876543210") 'should appear on bottom line

label:
goto label 'run loop doing nothing.

If the above does not work, then you have pinned it down to a hardware issue. Double check the links on the LCD. If all is OK, then it might be a baud tollerance issue and you might need to start playing with CALIBFREQ.
 

Diesel62

New Member
Thanks for that your code works , I will have to work backwards to find problem.
I appreciate the quick replies
 

westaust55

Moderator
Seems a little strange.

You say it works with Beaniebots code - whihc is good and sugegsts not a hardware problem.

But to get the date/time display you emntion on the bottom line this occurs only when the CLK pins are bridged and there is no clock chip.
From the manual:
Connect a power supply to the main connection header (red wire to V+, black
wire to 0V). The LCD should display a time message when the two CLK
contacts are shorted (e.g. with the jumper provided in the kit) and once the
contrast is adjusted (via the variable resistor marked &#8216;contrast&#8217;). If the LCD
does not display a message check the power, contrast and the 14 connector pins
carefully. (Note that if the optional clock upgrade chip is not fitted, the time
will always show as 00/00/00 00:00
)
If code is not writing the time and date to the bottom line, which it not, then suggests have a look around the CLK pins for a solder bridge.
 
Last edited:

Diesel62

New Member
Yes that is what is on the bottom line of the display 00/00/00 00:00
but with beaniebots code it overwrites it ,my one dosnt. My code works ok in simulation .
If I just put 254,128 ("asdfghjkl1234567")
254,192 ("qwertyuiop123456")
it will work but it flashes
strange.
 

Technical

Technical Support
Staff member
The clock message will appear if you have the CLK jumper in place or if you output the byte 0 at any point (see 'Displaying the Time' in the manual). This is probably what is causing the unwanted display - a byte 0 being transmitted by mistake somewhere. As you are using output 0 (which is also the download output) you will get all sort of nonsense on the display as a new download occurs - and 0's will definitely be transmitted during the download process. As BB suggests, a simple

serout 0,n2400,(254,1) 'reset + clear LCD
Pause 1000 'wait for it to reset

at the top of your program should solve it.
 
Last edited:

westaust55

Moderator
As Technical says,

from the aAXE033 manual:

Therefore the following program will display message 1 on the top line of the
display, and the time on the bottom line of the display.
init: pause 500
main: serout 7,N2400, (1)
pause 10
serout 7,N2400, (0)
pause 500
goto main

Diesel try removing the double quotes ("") at the end of each SEROUT command - that shows up as a value of zero being sent
 
Last edited:

westaust55

Moderator
Feedback when problems resolved

Thanks all will keep typing and reply with an (answer) ,the forum seems to lack that ! cheers
Diesel62,

Yes, that would be greatly appreciated. While there are many who DO say “Thanks” however from my own short period experience here, there are also some who do not. Lots of questions but little thanks.

I recently (in past week) specifically asked the starter of a recent thread if the information provided proved useful for my own and general forum future reference, but while that member has made other posts in recent days, he did not bother to respond to my question. A fact of life I guess.

Sometimes various members offer a number of suggestions that may differ widely but if there is no “closure” with a firm response stating what resolved the issue it does also not help newbies and more experienced members who later have a similar problem (and do a search), to define exactly what was the solution or whether the information was useful.
 

BeanieBots

Moderator
Oh so true. More often than not, threads continue with "experts" discussing the merits of one solution over another and the original poster is never heard of again so we never know what did or didn't work.

It's always good to able to make statements like
"the most common cause of your problem is...." but it needs feedback to know that.
To get thanks is nice, but to get full feedback (good or bad) is very important.

westaust55, Personally, I don't have the time or patience with that particular individual. I admire your persistance.
 

westaust55

Moderator
Feedback on solved issues

Hi beaniebots,

The person you speak of does indeed require considerable patience and repetition but it was another slightly more erudite younger member who I was thinking of.

Next classes in Persistence 101 are starting soon . . . . . ;)
 

Diesel62

New Member
thanks all I appreciate your help
I was using a base code from another post (trying to learn) with the serout 0 ,n2400,(254,128,#1m0,"")the double quotes were giving me the 0 . then that was displaying the 00/00/00 00:00 .By using serout 0 this was causing an issue also.
All working well now but have run out of room on chip,I still have to add code to remove the extra digits left on screen when when coming down in adc voltage
thanks again.
 

westaust55

Moderator
Great to hear that the serout problem has been resolved.

Post your updated code and someone here will help with some guidance on optimisation to reduce the space I am sure.

Maybe a hack saw needed this time to cut off some bytes :D

Better let people know which PICAXE chip you need it to fit into and the current size so they have an idea what is required in terms of space reduction.
 

Diesel62

New Member
thanks
Im going to transfer code to 18x and try datalogging now,08m was just to try lcd programming.
I should have new headache soon !!!
 

BeanieBots

Moderator
Thanks for getting back and explaining the root cause and fix.
There are several methods for 'cleaning' the display with numbers of different lengths
serout 0 ,n2400,(254,128,#1m0," ")
Note there should be spaces between the quotes at the end.
or
replace the "128" with a variable and test lm0 to see how many digits then add the required amount.
With a 28X1, there is the command DIG recently highlighted by Jerremy.
You could use that to get the value of each digit then test them to decide if to send "0" or space.

If you come up with nice neat compact solution please share as this issue is quite a pain.
 

westaust55

Moderator
Don't have access to any of my code samples at the moment (and out and about much of the weekend).

I always right justify my numbers. In that way, the right most digit is always in the sample place and where needed I "print" spaces in front of numbers with less digits.

That way the basic printing for a number always starts at the same point and just print the necessary number of spaces prior to the actual number.
need to know the max no of digits that can occur.

Lets say can be 3 digits (0-255) and value is in b0 then:

In simple terms:
Code:
SYMBOL check = b1
;
;
serout 0, N2400, (254,128)     ; move to desired start position
                                         ; change 128 to whatever you need
check = b0/100
IF check = 0 THEN
  SEROUT 0, N2400, (" ")         ; space if required in 100's position
  check = b0/10
  IF check = 0 THEN
    SEROUT 0, N2400, (" ")       ; space if required in 10's position
  ENDIF
ENDIF
SEROUT 0, N2400, (#b0 )        ; print value in remaining positions
 
Top