Parallel LCD and 28x2 - again...

Dear all,

This is my first post to picaxeforum, though I have read many pages prior to this.

Please let me start by saying that I feel I have exhausted the official handbook, Google, this forum, my close circle of friends, and even my pet parakeet about this issue I'm having with parallel interface of the LCD screen.

I have seen Hippy's code mentioned many times, yet all the links to his work seem to result in 404 errors.

Having tried perhaps 4 or 5 methods, involving different code, I am still stuck. I have tried on the AXE022 protoboard with the same results, so tried on a breadboard with no further luck.

I own an AXE033 which I'm sending back to the seller, since it will not correctly initialise ANY of the screens I have tried (ie: I don't think my LCD is broken) - however for knowledge/education/experience, I would like to create a parallel interface. Not particularly keen on going down the line of the easiest way to interface picaxe with an LCD - I'm just unsure why parallel isn't working.

I am using both the LCD screen from AXE033 and one purchased from Altronics (Z7011) with exactly the same results (although I need to increase contrast by more on the screen included with the AXE033 to see the solid blocks). Both are 16x2 displays, with similar specifications (apart from backlight).

My picaxe is on a breadboard with the minimum circuitry as per the handbook. I have then wired the following pins from the picaxe to the LCD:

23 (B.2) to 4
24 (B.3) to 6
25 (B.4) to 11
26 (B.5) to 12
27 (B.6) to 13
28 (B.7) to 14

I have tried this with and without 330 ohm resistors as per the guidebook.

A 10K potentiometer is plugged into pin 3 on the LCD.

All other pins on the LCD (ie: 5, 7, 8-10) are connected to 0V, however I have tried with these pins floating as well.

For troubleshooting, I have wired LED + 330 ohm resistors in parallel with each of the 6 pins, and included suitable pauses in the programming.

Despite this, no LEDs light up, and the LCD screen maintains its solid array of blocks on the top line, which other threads have said is a sign that it is not initialising correctly.

My code is as follows:
(From http://galia.fc.uaslp.mx/~cantocar/microcontroladores/PICAXE/PICAXE_LCD_INTERFACING.HTM)

<code>
SYMBOL RS = B.2 ; 0 = Command 1 = Data
SYMBOL E = B.3 ; 0 = Idle 1 = Active
SYMBOL DB4 = B.4 ; LCD Data Line 4
SYMBOL DB5 = B.5 ; LCD Data Line 5
SYMBOL DB6 = B.6 ; LCD Data Line 6
SYMBOL DB7 = B.7 ; LCD Data Line 7

SYMBOL RSCMDmask = %00000000 ; Select Command register
SYMBOL RSDATmask = %00000100 ; Select Data register

SYMBOL get = b11
SYMBOL byte = b12
SYMBOL rsbit = b13

' Nibble commands - To initialise 4-bit mode

EEPROM 0,( $33 ) ; %0011---- %0011---- 8-bit / 8-bit
EEPROM 1,( $32 ) ; %0011---- %0010---- 8-bit / 4-bit

' Byte commands - To configure the LCD

EEPROM 2,( $28 ) ; %00101000 %001LNF00 Display Format
EEPROM 3,( $0C ) ; %00001100 %00001DCB Display On
EEPROM 4,( $06 ) ; %00000110 %000001IS Cursor Move

; L : 0 = 4-bit Mode 1 = 8-bit Mode
; N : 0 = 1 Line 1 = 2 Lines
; F : 0 = 5x7 Pixels 1 = N/A
; D : 0 = Display Off 1 = Display On
; C : 0 = Cursor Off 1 = Cursor On
; B : 0 = Cursor Steady 1 = Cursor Flash
; I : 0 = Dec Cursor 1 = Inc Cursor
; S : 0 = Cursor Move 1 = Display Shift

EEPROM 5,( $01 ) ; Clear Screen

PowerOnReset:

GOSUB InitialiseLcd

DisplayTopLine:

EEPROM 6,("Hello")

FOR get = 6 TO 10
READ get,byte
GOSUB SendDataByte
Pause 1500
NEXT get


MoveCursorToStartOfSecondLine:

byte = $C0
GOSUB SendCmdByte

DisplayBottomLine:

EEPROM 11,("World!")

FOR get = 11 TO 16
READ get,byte
GOSUB SendDataByte
Pause 1500
NEXT get

END

InitialiseLcd:

FOR get = 0 TO 5
READ get,byte
GOSUB SendInitCmdByte
Pause 1000
NEXT get

' Nibble commands - To initialise 4-bit mode

EEPROM 0,( $33 ) ; %0011---- %0011---- 8-bit / 8-bit
EEPROM 1,( $32 ) ; %0011---- %0010---- 8-bit / 4-bit

' Byte commands - To configure the LCD

EEPROM 2,( $28 ) ; %00101000 %001LNF00 Display Format
EEPROM 3,( $0C ) ; %00001100 %00001DCB Display On
EEPROM 4,( $06 ) ; %00000110 %000001IS Cursor Move

; L : 0 = 4-bit Mode 1 = 8-bit Mode
; N : 0 = 1 Line 1 = 2 Lines
; F : 0 = 5x7 Pixels 1 = N/A
; D : 0 = Display Off 1 = Display On
; C : 0 = Cursor Off 1 = Cursor On
; B : 0 = Cursor Steady 1 = Cursor Flash
; I : 0 = Dec Cursor 1 = Inc Cursor
; S : 0 = Cursor Move 1 = Display Shift

EEPROM 5,( $01 ) ; Clear Screen

RETURN

SendInitCmdByte:

PAUSE 1500 ; Delay 1.5sec

SendCmdByte:

rsbit = RSCMDmask ; Send to Command register

SendDataByte:

pinsB = byte & %11110000 | rsbit ; Put MSB out first
PULSOUT E,1000 ; Give a pulse on E
pause 1000
pinsB = byte * %00010000 | rsbit ; Put LSB out second
PULSOUT E,1000 ; Give a pulse on E
pause 1000

rsbit = RSDATmask ; Send to Data register next

RETURN
</code>

I have attached a photograph of my breadboard below.

Loading a program that individually flashes LEDs works fine, and there doesn't seem to be a problem downloading the code.

Many thanks for your ideas and help.

Charles
 

Attachments

marks

Senior Member
Last edited:

100317

New Member
Before you send Databytes to the lCD, you should send the cursor position.

Insert the following in your program after the Label:
DisplayTopLine:
byte = $80
GOSUB SendCmdByte

Hans
 
Sorry this is off topic a bit also recently purchased a 20x4 lcd and a driver board that works well. i think what you propose is a lot of work especialy when you can get one to drive a
16x2 display for about $8.50 plug and go lol.
heres a couple of threads i hope interest you.
http://www.picaxeforum.co.uk/showthread.php?t=16781
http://www.picaxeforum.co.uk/showthread.php?t=16789

not sure i think i read that blocks are a contrast issue
Thanks Marks, I have read those threads amongst my study of this issue.

One of the things that bothers me, and I believe makes this project worthwhile, is that this SHOULD be working. Others have done this, and had it work. I think there is something to be chased by following this through.

I like the idea of a 20x4, and for down the track will be a great addition to the picaxe arsenal.

Others have also mentioned that the solid blocks are just an indication that the screen is yet to initialise. If I turn the 10K pot, the contrast of the screen still changes.

Cheers for your reply! Good to see another Sandgroper on the forum! :)

Also, thanks for your input, hans99. No joy, unfortunately. Screen still isn't initialising, and is just showing the solid blocks still. We'll keep plugging away.

Charles
 

Svejk

Senior Member
Seems that you don't make portB outputs, otherwise your LCD should work ok.

Add

let dirsB = $FF

as the first line in your software.

Edit: Also, the code needs a clean up: byte, get variable names aren't permited in PE 5.3.1. and EEPROM instructions are doubled up.

You are missing a decoupling capacitor at the Picaxe supply.
 
Last edited:
Seems that you don't make portB outputs, otherwise your LCD should work ok.

Add

let dirsB = $FF

as the first line in your software.

Edit: Also, the code needs a clean up: byte, get variable names aren't permited in PE 5.3.1. and EEPROM instructions are doubled up.

You are missing a decoupling capacitor at the Picaxe supply.
Hi Svejk, thanks for your reply.

I'm aware that the EEPROM instructions are doubled - it seemed counterintuitive to me that the EEPROM instructions should be after the initialisation subroutine.

I've removed the 2nd EEPROM instructions, and renamed get and byte. Still no joy.

My power supply is a regulated 5v DC which is out of the picture frame. Is this likely to make a difference? I've been able to get all other code working with this setup so far...
 

matherp

Senior Member
The attached 28X2 code definitely works if the LCD is connected correctly. Pinouts are in the code
Code:
#picaxe 28X2
#no_table
'Connect D4-D7 on LCD to b.0 to B.3, RS to C.4, E to C.5
'Connect R/W to ground
symbol uppernibble=b18
symbol lowernibble=b19
symbol x=b20
symbol y=b21
symbol LCDRS = c.4
symbol LCDE = c.5
symbol clearscreen = $01
symbol displayandcursorhome = $02
symbol displayandcursoron = $0F
symbol displayoncursoroff = $0C
symbol twoline=$28
symbol DB4high = $01
symbol DB5high = $02
symbol DB6high = $04
symbol DB7high = $08
symbol counter = w12

counter=0
gosub ini_display
x=0
y=0
gosub gotoxy
b0="H"
gosub sendbyte
b0="e"
gosub sendbyte
b0="l"
gosub sendbyte
b0="l"
gosub sendbyte
b0="0"
gosub sendbyte
do
	bintoascii counter,b4,b5,b6,b7,b8
	x=0:y=1
	gosub gotoxy
	b0=b4
	gosub sendbyte
	b0=b5
	gosub sendbyte
	b0=b6
	gosub sendbyte
	b0=b7
	gosub sendbyte
	b0=b8
	gosub sendbyte
	pause 200
	inc counter
loop


ini_display:
	high LCDE	
	low LCDRS 'set command mode for init
	dirsc = $FF
	dirsb= $0F
	pinsb=DB4high+DB5high 'set for 8 bit operation to initialise
	low LCDE
	high LCDE
	pause 40 ' pause 10ms
	low LCDE
	high LCDE
	pause 1 ' pause 10ms
	low LCDE
	high LCDE
	pause 1 ' pause 10ms
	pinsb= DB5high ' set for 4 bit operation
	low LCDE
	high LCDE
	pause 1 ' pause 10ms
	b0=twoline
	gosub sendcommand
	b0=displayoncursoroff
	gosub sendcommand
	b0=clearscreen
	gosub sendcommand
	b0=displayandcursorhome
	gosub sendcommand
return

sendbyte:
	lowernibble=b0 & %00001111
	uppernibble=b0 >> 4
	pinsb= uppernibble
	low LCDE
	high LCDE
	pinsb= lowernibble
	low LCDE
	high LCDE
return

gotoxy:
	b0=x
	if y=1 then: b0=b0+$40:endif
	b0=b0+$80
sendcommand:
	lowernibble=b0 & %00001111
	uppernibble=b0 >> 4
	low LCDRS
	pinsb= uppernibble
	low LCDE
	high LCDE
	pinsb= lowernibble
	low LCDE
	high LCDE
	if b0=clearscreen or b0=displayandcursorhome then
		pause 8 '2ms pause at 32Mhz
	else
		pauseus 16 '40us pause at 32MHz
	endif 
	high LCDRS 'always set for data
return
 

Svejk

Senior Member
Ok, bellow is an example that is tested to work with LCD.

If this routine doesn't produce any output then you should check again your LCD wiring. Not all LCD's have the same pinout layout. See the LCD datasheet.

If you get it going please come back and let us know how you fixed it.

Code:
#rem
LCD Example for Picaxe 28x2

b.7 --> DB7
b.6 --> DB6
b.5 --> DB5
b.4 --> DB4
b.3 --> EN
b.2 --> RS

Based on Hippy's code.

#endrem


#picaxe 28x2
#no_data
#no_table

  dirsB = $FF

  symbol Counter = b55
  symbol chr     = b54

'LCD
  symbol RSCMDmask = %00000000 	'select Command register
  symbol RSDATmask = %00000100 	'select Data register
  symbol Line1 = $80 		 	'1ST Line address
  symbol Line2 = $C0  			'2bd line address
  symbol En    = b.3
  symbol rsbit = b53
  
  
OnPowerUp:
  eeprom  0, ($33, $32, $28, $0C, $06)

  'initialize LCD
  pause 500
  for counter = 0 to 5
    read counter, Chr
    gosub SendCmdLCD 
    pause 300
  next counter
  
'Test LCD
  for counter = 0 to 14
    lookup counter, ("Working example"), chr
    gosub SendDataLCD
  next counter
  
  
'loop forever
  do:loop

  
'LCD Routines
SendCmdLCD:
  RSbit = RSCMDmask

SendDataLCD:
  pinsB = chr & %11110000 | rsbit
  pulsout En, 2

  pinsB = chr * %00010000 | rsbit
  pulsout En, 2

  rsbit = RSDATmask
 return
 

hippy

Ex-Staff (retired)
I own an AXE033 which I'm sending back to the seller, since it will not correctly initialise ANY of the screens I have tried (ie: I don't think my LCD is broken) - however for knowledge/education/experience, I would like to create a parallel interface.
I would recommend getting the AXE033 and LCD's working first; if the LCD's won't work with that it seems to me you'll have little chance of making them work with a direct parallel interface. I'd also recommend keeping the AXE033 until you do get the LCD's working then you can better judge it's worth and value.

The AXE033 is sold by Rev-Ed ( www.techsupplies.co.uk/AXE033 ) and official distributors with an LCD which should work with the AXE033, and this should also be the case for any HD77480 controller-based LCD and compatible.
 

westaust55

Moderator
@Charles,

still your day 1 for your posts so,
WELCOME TO THE PICAXE FORUM :)

Firstly, you need to use the square brackets [ ] instead of <> around the code as makers for it to appear in a sub window.

Hippys information is still available here:
http://web.archive.org/web/20071206202610/http://www.hippy.freeserve.co.uk/picaxelc.htm#Picaxe-28

The suggestion by Hans is not essential immediately after initialisation but will not cause problems.

The dirsb =$FF as suggested by Svejk is requried for the newer X2 (and M2) parts.

If the photo of the breadboard is with the LCD taken from the AXE033 module then the pin 1 is at the right side as seen in the photo.

But a look at the Altronics website for the Altronics Z7000/Z7011 I suspect that pin 1 may be at the left side based on the limited information as the datsaheet shows that pin 1 is at opposite end to backligtht terminals.
http://www.altronics.com.au/index.asp?area=item&id=Z7000A
http://www.altronics.com.au/download/Datasheets/Z7000A.pdf
Try a test with a multimeter to confirm.
 

hippy

Ex-Staff (retired)
there doesn't seem to be a problem downloading the code.
That's odd because, without the changes suggested earlier, the program should not even compile, let alone download.

I'd suggest re-posting the exact code you are using and full details of the LCD being used.
 

BeanieBots

Moderator
You say you get black boxes. It may simply be that you have the contrast too high and cannot see the characters. Try turning it down so that the boxes are still visible but very faint.
 

westaust55

Moderator
The image with post 1 shows black boxes only for the top row which is a fair sign that the LCD is not initialized by the Picaxe
 

BeanieBots

Moderator
Good point westy, didn't look closely at the picture.
I agree, likely to be either incorrect or no initialisation.

Does the PICAXE work OK?
Check the reset line.
Maybe add a few sertxd lines to confirm operation.
 
@Charles,

still your day 1 for your posts so,
WELCOME TO THE PICAXE FORUM :)

Firstly, you need to use the square brackets [ ] instead of <> around the code as makers for it to appear in a sub window.

Hippys information is still available here:
http://web.archive.org/web/20071206202610/http://www.hippy.freeserve.co.uk/picaxelc.htm#Picaxe-28

The suggestion by Hans is not essential immediately after initialisation but will not cause problems.

The dirsb =$FF as suggested by Svejk is requried for the newer X2 (and M2) parts.

If the photo of the breadboard is with the LCD taken from the AXE033 module then the pin 1 is at the right side as seen in the photo.

But a look at the Altronics website for the Altronics Z7000/Z7011 I suspect that pin 1 may be at the left side based on the limited information as the datsaheet shows that pin 1 is at opposite end to backligtht terminals.
http://www.altronics.com.au/index.asp?area=item&id=Z7000A
http://www.altronics.com.au/download/Datasheets/Z7000A.pdf
Try a test with a multimeter to confirm.
Hi WestAust55,

I have the dirsb = $FF in the code, still no joy.

With the breadboard setup, I can make pinsB either all high, all low, or flash in patterns by sending code to the picaxe to control individual pins, so I'm fairly certain that the picaxe is working correctly, and the pins are plugged into the right place.

I've connected the pins as per the writing on the reverse side of the PCB of the LCD display, where pin 1 is at the right, followed by A and K, and pin 14 is at the left (hence plugged into B.7).

I'm in a bit of trouble from the better half about the amount of time I've been spending on my picaxe programming in the last couple of weeks, but she's about to head into work for a couple of hours. As soon as she's gone, I'll post the code I'm using currently.

Also had a play with some sertxd lines for debugging - if I write a program to stream serial text, I can read it on the computer. If I write sertxd into the picaxe program for the LCD screen, I get nothing. Perhaps this is a sign of it not compiling properly?

Many thanks for your help! Hopefully I can get this going - it has been a bit of a stumbling block in my current project.

Sorry about the pointy brackets - realised just after I hit the send button :)

Charles
 
Okay, I have double checked my wiring, which seems to be correct, and tried both of the codes tested for 28X2 on Page One of this thread (with their appropriate wiring schematics), also on my AXE022 development board. I can flash LEDs individually, but cannot make LEDs flash if I add pauses, and no serial outputs if I add those in either.

The chips work fine for other programs, but not this one. Getting towards my wits end on this.

Gremlins, perhaps?

There's always the "Charles spazz factor" which I invoke quite often, and is probably to blame here. Problem is, I don't know where to start looking.

Thanks for all of your help so far guys; from what I can tell, this SHOULD be working.

Charles
 
A breakthrough...

Well, I appear to have made a breakthrough.

No, I haven't managed to get the parallel interface to work, however I may know why.

I followed marks's advice and looked at the toysdownunder website. Turns out the guy who runs it is just down the road from me, so I put in an order and picked it up from him on Friday. After some careful soldering, I tried it with the "Happy Birthday Hippy!" code he posted. Nothing happened.

On compiling, I was greeted with a syntax error for the "I" in the label "Initialise:". So I did what I usually do for this kind of error, and made line 1 blank. This usually works for me - the code compiles, and usually does what it is supposed to do.

For the record, I use a MacBook Pro running OSX 10.4.11 with AxePad for Mac as my editor.

It seems as though when I copy and paste code from ANY source (even other AxePad programs), it is not compiling properly. It does not matter if I copy and paste it through a simple text editor to remove any formatting, I'm guessing that there is an alteration of the plain text.

I just typed out marks's code in length (with some changes in the displayed text) for the serial interface, and sure enough, my 20x4 display lit up, and displayed my "hello, world" program.

I then tried copying and pasting two lines of the code, adding some pauses, and making it display a couple of different messages. As I tried to compile the new program, I once again received an error message.

Trying my old trick, I simply made line 1 blank. The program compiled, but did not update the display.

Perhaps I should try writing the programs on a Windows PC? Clearly being able to copy and paste frequently used code, (especially when it uses lots of binary or hexadecimals,) and code that others have written, is important for PICAXE projects...

Has anyone heard of this kind of error? I wonder if it is specific to OSX (possibly my slightly older version), or if I can invoke the "Charles spazz factor" once more. I haven't found anything about this on google or this forum specifically.

Charles
 

westaust55

Moderator
good to see that you have at least managed to get a serial interface working.

Yes even with a PC (as oppoaserd to Apple product) there can be problems with copy and paste (from MS Word and the likes - but usually notepad is okay ) introducing incorrect characters that throw up syntax errors.

Initialise:
as a label should not be giving you a problem from checking the PICAXE manual appendices. Have you tried just retyping that one line.
 
Certainly glad that it let me get on with my project! :)

I don't think it's this particular label - this isn't the first time I've come across this problem, in hindsight. I've usually got around it, sometimes by retyping code.

Wouldn't have thought that copying and pasting from one AxePad window to another would have caused a drama on code I've written myself.

Anyway, borrowed an old laptop belonging to SWMBO, which works like a charm. I'll have another go at parallel interfacing in the next few days, and post back to the thread confirming my success.

Many thanks for all of your help!

Charles
 

hippy

Ex-Staff (retired)
On compiling, I was greeted with a syntax error for the "I" in the label "Initialise:". So I did what I usually do for this kind of error, and made line 1 blank. This usually works for me - the code compiles, and usually does what it is supposed to do.

For the record, I use a MacBook Pro running OSX 10.4.11 with AxePad for Mac as my editor.

It seems as though when I copy and paste code from ANY source (even other AxePad programs), it is not compiling properly. It does not matter if I copy and paste it through a simple text editor to remove any formatting, I'm guessing that there is an alteration of the plain text.

Has anyone heard of this kind of error? I wonder if it is specific to OSX (possibly my slightly older version)
This can be a problem on any system and particularly when copying from PDF, web pages, email or DTP documents where the copy from one to another changes things, but errors which seem to be related to 'hidden characters' do seem to be more prevalent on Macs.

Your analysis seems to be correct, something is altering the plain text. We don't know why that is or where the problem is occurring. A copy and paste from one AXEpad window to another AXEpad window should not be a problem. For copy, AXEpad simply tells the OS to 'take these characters and put them in the clipboard', and for paste tells the OS, 'give me what's on the clipboard' and then puts those in the source code window. It may not however be the clipboard at fault though, it could be some other peculiar interaction or circumstances which cause a problem elsewhere. It's one of those difficult issues that if one cannot replicate the problem it's very hard to track down where the issue may be.
 

hippy

Ex-Staff (retired)
Also had a play with some sertxd lines for debugging - if I write a program to stream serial text, I can read it on the computer. If I write sertxd into the picaxe program for the LCD screen, I get nothing. Perhaps this is a sign of it not compiling properly?
It's more likely that compilation is correct and it's simply that what's being sent to the AXE033 or parallel display isn't being shown; highly likely if the display has not correctly initialised or there's some error with the hardware, which is what the single line of black squares suggest.
 
It's more likely that compilation is correct and it's simply that what's being sent to the AXE033 or parallel display isn't being shown; highly likely if the display has not correctly initialised or there's some error with the hardware, which is what the single line of black squares suggest.
Thanks for your help, Hippy.

I think that I'll stick with the Windows software for the time being. It seems to be working very well - none of the previous issues so far. I've nicely integrated a parallel display into my project, which is doing the job.

I don't think that the program was being compiled correctly because not only was the display not initialising, I wasn't receiving sertxd outputs over the serial link back to my computer. My feeling is that the program was compiling incorrectly, which was the cause of the screen not initialising/no sertxd, rather than a symptom.

If I get time free from this project (Which now has me wrapped up again) I'll reattempt the serial interface. I'm sure it will work now.

Once again, thank you so much for all of your assistance.

Charles
 

westaust55

Moderator
@Charles,

Without going back to review you more recent program code, one aspect to be aware of when first initialising an LCD display is that some time is needed for the LCD to undertake its own internal actions before you can send it any commands.

Typically around 400 to 500ms is sufficient but this may extend out to longer periods.

A lot of capacitance on the supply rails can cause the voltage to rise a little too slowly so that the LCD internal process does not commence in which case a reset of the LCD module by command from the PICAXE can help resolve such initial problems.

Also congrats on getting your displays sorts out.
 

papaof2

Senior Member
be aware of when first initialising an LCD display is that some time is needed for the LCD to undertake its own internal actions before you can send it any commands.
I spent about 30 minutes on the phone with a friend this morning getting the timing right for initializing an LCD. In his case, it's the status display for the uMFPU he's learning to program. The FPU will be the navigation computer - comparing current GPS position vs next waypoint and determining which direction to go - for a larger PICAXE project (40X2 master, 28X2 slave). Since his background is Access, uMFPU assembly is proving difficult for him - something about limited variables and no point & click ;-)

John
 

Eschatonic

New Member
Thanks for your help, Hippy.

I think that I'll stick with the Windows software for the time being. It seems to be working very well - none of the previous issues so far. I've nicely integrated a parallel display into my project, which is doing the job.

I don't think that the program was being compiled correctly because not only was the display not initialising, I wasn't receiving sertxd outputs over the serial link back to my computer. My feeling is that the program was compiling incorrectly, which was the cause of the screen not initialising/no sertxd, rather than a symptom.

If I get time free from this project (Which now has me wrapped up again) I'll reattempt the serial interface. I'm sure it will work now.

Once again, thank you so much for all of your assistance.

Charles
Hi Charles,

I have experienced infuriating symptoms like this on various platforms - try this.

Get yourself a freeware hex editor if you don't already have one - I dunno what is available on a Mac. Google "hex editor for Mac freeware".

Edit your PICAXE code looking for incidences of hex 09 which is the horizontal tab character. If you find any change them to space characters. Save it and recompile it.

Compilers will often jump over lines when they 'see' an HT character.

If you want to e-mail me your code I'd be happy to search it for you.

All the Best

Graham
 

westaust55

Moderator
I spent about 30 minutes on the phone with a friend this morning getting the timing right for initializing an LCD. In his case, it's the status display for the uMFPU he's learning to program. The FPU will be the navigation computer - comparing current GPS position vs next waypoint and determining which direction to go - for a larger PICAXE project (40X2 master, 28X2 slave). Since his background is Access, uMFPU assembly is proving difficult for him - something about limited variables and no point & click ;-)

John

Get your friend to have a look at the uMFPU basic tutorial I Putin finished projects area.
 
Last edited:
Top