Help .. convert to characters
Moderators: David Barker, Jerry Messina
Re: Help .. convert to characters
Confirmed PICAXE code regarding baud and mode setup
symbol Baud_Setup = B19200_64
symbol Mode = %00000000 'Mode: No background receive, no serial data invert.
Latest baudrate on GLCD
USART.SetBaudrate(br19200)
Photo with result attached
symbol Baud_Setup = B19200_64
symbol Mode = %00000000 'Mode: No background receive, no serial data invert.
Latest baudrate on GLCD
USART.SetBaudrate(br19200)
Photo with result attached
- Attachments
-
- GLCD4.JPG (46.68 KiB) Viewed 5771 times
Re: Help .. convert to characters
also set max lines to 5
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: Help .. convert to characters
You could well be right that the baudrates aren't being set to match, but just to be clear:The only time he got printable characters to the GLCD was when you added HexToStr. the other times
it was just the raw data which makes me think that the baud is incorrect
EVERY message sent from the picaxe contains some raw binary unprintable data, so in almost every case you have to use one of the convert functions to turn the data into an ASCII string. The exception are the message numbers 23-26 which send two ASCII characters, but even these send one byte of binary data first (the number 23-26).
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: Help .. convert to characters
You're likely getting framing errors.
I see
If you have an external 10MHz xtal you need to uncomment that config OSC=HSPLL, or set 'clock = 10'
I see
Code: Select all
Device = 18F2525
Clock = 40 ' external crystal x 4
//Config OSC = HSPLL ' Config OSC = HSPLL
Re: Help .. convert to characters
Great news it works! Thanks very much for help. I don't recall why I had 40 instead of 10.
I can now start some meaningfully programming. BTW this is my first programming project ever.
On another note see my photos.
I put the following into to code to see that I can utilize the full real estate.
However after that I can write to the 3rd CS3 area. I am using the moded ks0108 code to enable CS3
I can now start some meaningfully programming. BTW this is my first programming project ever.
On another note see my photos.
I put the following into to code to see that I can utilize the full real estate.
Code: Select all
GLCD.WriteAt(5,5,"RESET 5 5")
GLCD.WriteAt(100,5,"RESET 100 5")
GLCD.WriteAt(5,100,"RESET 5 100")
GLCD.WriteAt(100,100,"RESET 100 100")
Code: Select all
#option GLCD_SIDE_SIZE = 64 // Screen Block (side) size. For Some screens = 60 (check your datasheet).
#option GLCD_SCREEN_WIDTH = 192 // Screen Width in Pixels
#option GLCD_SCREEN_HEIGHT = 64 // Screen Height in Pixels
#option GLCD_CS_COUNT = 3 // Count of CS Lines. Must be 2 or 3
- Attachments
-
- GLCD6.JPG (27.06 KiB) Viewed 5757 times
-
- GLCD5.JPG (32.65 KiB) Viewed 5757 times
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: Help .. convert to characters
Congratulations! Not bad for a first time attempt.BTW this is my first programming project ever
If I might make a suggestion - next time try and include as much info as possible.
The stuff Coccoliso and bitfogav were able to dig up really helped. Once we got the formatting out of the way, bitfogav was right... it WAS a baudrate issue, just not an obvious one.
Re: Help .. convert to characters
Yeah great news!
It would be nice to see your final build for this project!, And thanks to Jerry too for the initial code he posted a few posts ago, that helped see the problem.
It would be nice to see your final build for this project!, And thanks to Jerry too for the initial code he posted a few posts ago, that helped see the problem.