ROYMARNEWICK
New Member
Hopefully somebody can help with the SEROUT command.
Background :
I have only done one program on an MCU and it has been extensively tested using the Picaxe Editor software using the “Simulate” facility. This has been successful. However, for extending the capability of my program, I require more program memory. I also have not purchased any hardware – so cannot do any prototype testing.
My program uses many SEROUT commands, which are very heavy on memory. These presently utilise the typical 2 line code (and work correctly) – for example ;
100 serout B.7, N2400, (254, 128) ; cursor to beginning of line 1
101 serout B.7, N2400, (“Hello”) ; display “Hello” on line 1
102 serout B.7, N2400, (254, 192) ; cursor to beginning of line 2
103 serout B.7, N2400, (“Goodbye”) ; display “Goodbye” on line 2
I have now saved the messages to the LCD/OLED memory as follows :
50 serout B.7, N2400, (253, 1, “Hello”) ; “Hello” saved as message No.1
51 serout B.7, N2400, (253, 2, “Goodbuy”) ; “Goodbye” saved as message No.2
….
….
100 serout B.7, N2400, (1) ; display message No1 to line 1 of display
101 serout B.7, N2400, (2) ; display message No2 to line 2 of display
When the modified code is run, the words “Hello” and “Goodbuy” do not display at all and the screen only display a single character which looks similar to a T rotated 90 degrees anti-clockwise. My queries are :
• As I understand, messages 1,3,5 & 7 are printed to line 1 and messages 2,4 & 6 are printed to line 2. Am I correct in understanding that I do not require the lines 100 & 102 of the old code in the new code – as the message number, dictates the default line and start position at the beginning of the line?
• I am assuming that the messages do not display correctly on the Picaxe simulation because Picaxe does not correctly simulate the saving and retrieval of messages from the LCD/OLED memory – am I correct – or is there a fault with my code?
I do not have any Picaxe hardware yet to try a live prototype – so any help will be most appreciated.
Roy Marnewick
Background :
I have only done one program on an MCU and it has been extensively tested using the Picaxe Editor software using the “Simulate” facility. This has been successful. However, for extending the capability of my program, I require more program memory. I also have not purchased any hardware – so cannot do any prototype testing.
My program uses many SEROUT commands, which are very heavy on memory. These presently utilise the typical 2 line code (and work correctly) – for example ;
100 serout B.7, N2400, (254, 128) ; cursor to beginning of line 1
101 serout B.7, N2400, (“Hello”) ; display “Hello” on line 1
102 serout B.7, N2400, (254, 192) ; cursor to beginning of line 2
103 serout B.7, N2400, (“Goodbye”) ; display “Goodbye” on line 2
I have now saved the messages to the LCD/OLED memory as follows :
50 serout B.7, N2400, (253, 1, “Hello”) ; “Hello” saved as message No.1
51 serout B.7, N2400, (253, 2, “Goodbuy”) ; “Goodbye” saved as message No.2
….
….
100 serout B.7, N2400, (1) ; display message No1 to line 1 of display
101 serout B.7, N2400, (2) ; display message No2 to line 2 of display
When the modified code is run, the words “Hello” and “Goodbuy” do not display at all and the screen only display a single character which looks similar to a T rotated 90 degrees anti-clockwise. My queries are :
• As I understand, messages 1,3,5 & 7 are printed to line 1 and messages 2,4 & 6 are printed to line 2. Am I correct in understanding that I do not require the lines 100 & 102 of the old code in the new code – as the message number, dictates the default line and start position at the beginning of the line?
• I am assuming that the messages do not display correctly on the Picaxe simulation because Picaxe does not correctly simulate the saving and retrieval of messages from the LCD/OLED memory – am I correct – or is there a fault with my code?
I do not have any Picaxe hardware yet to try a live prototype – so any help will be most appreciated.
Roy Marnewick