Anubis1985
Senior Member
Hello,
I created a program, tested on a PICAXE 20x2, to draw geometric shapes on an SSD1327 display.
However, I have a small problem that I can't seem to solve.
I can't read the contents of a segment.
Each segment read is always equal to 2, regardless of the value entered.
Here's how it works:
A segment controls two pixels in the horizontal direction (corresponding variable = x).Each value controls two pixels: the first pixel has its maximum brightness, and the second is off.If you want to do the opposite, you would need to set the value to 240 instead of 15.If you want to light both pixels at their maximum brightness, you would need to set it to 255.
240 = 11110000 'Left pixel lit at its maximum brightness.
15 = 00001111 'Right pixel lit at its maximum brightness.
In my program, the content of a segment is read on line 182 and the segment is drawn on line 201 in DrawsPixel.
The image shows what the program does.
You can see that the lines are dotted horizontally because I can't retrieve the correct value for a segment.
Thank you in advance
I created a program, tested on a PICAXE 20x2, to draw geometric shapes on an SSD1327 display.
However, I have a small problem that I can't seem to solve.
I can't read the contents of a segment.
Each segment read is always equal to 2, regardless of the value entered.
Here's how it works:
A segment controls two pixels in the horizontal direction (corresponding variable = x).Each value controls two pixels: the first pixel has its maximum brightness, and the second is off.If you want to do the opposite, you would need to set the value to 240 instead of 15.If you want to light both pixels at their maximum brightness, you would need to set it to 255.
240 = 11110000 'Left pixel lit at its maximum brightness.
15 = 00001111 'Right pixel lit at its maximum brightness.
Code:
hi2cout (SETSTARTLINE,15) 'Example to display one pixel
In my program, the content of a segment is read on line 182 and the segment is drawn on line 201 in DrawsPixel.
The image shows what the program does.
You can see that the lines are dotted horizontally because I can't retrieve the correct value for a segment.
Thank you in advance
Attachments
Last edited: