Please update as you wish in GitHub. I can then 'update' to create the new Help.
The image does not shown in the GitHub source but it is shown in the attached CHM file. You will have to UNBLOCK the CHM if you download from this post.
How to change the Xscale (µs) in code easily?
Er... it's not a "real" oscilloscope :)
ptr2=ptr2+4 ;x position for start and end line x positions
This is the code I wrote for "oscilloscope". It is not the synwrite demo which just plots, this joins the dots.
I'll wire up a ssd1306 to a 328 and test this but I thought it was easy to redefine a char set anyway but never tried.
I never learnt how to use Github or download anything.
my xor scope video https://www.youtube.com/watch?v=AamRBAAmaZA
While I was tinkering with the code to try your changes I am learning more and more how GCB works. Sometimes text was even up-side-down and mirrored :)
I may have restored the ability to show characters and have the XOR graphics. Do try to see if characters now display.
I could replicate the issue and think this is still a character problem:
If I use "#Define GLCD_PROTECTOVERRUN" in the oscilloscope code and then stop the oscilloscope graphic and then try to display some text all is up-side-down and mirrored?
ptr2=ptr2+4 ;x position for start and end line x positions
How could the Xscale multiplied by 2 or divided by 2?
I never learnt how to use Github
Me neither, but I can supply Evan with the info for now.
Last edit: Haroen 2023-01-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This sets xor and print and erases "test" although it's set to foreground
ie glcdprint (0,0,"test",1).
This must be dated code by Anobium.
I have not used ssd1306 on gcb for years.
Anobium- I found a bread board wired for ssd1306 and 3K9R pullups and 328 nano but it had a lgt328 on the board and it did not work.
I then remembered lgt328 is 3.3V logic and can not remember if it ever worked. Code was changed to #chip lgt328.
Changing to 328p nano, same pinout and it worked?
Does it need a logic level converter like ili9341 does with arduino 328p nano as ili9341 is 3.3V logic but the other way around that ssd1306 is 5V logic and lgt328 is 3.3V logic... if you follow my drift?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I dont know the answer. The max operating voltage of the GLCD Is the constraint. The operating of the micro-controller needs to match the operating voltage of the GLCD.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My above code xor flashing "test".
do
GLCDPrint (0,0,"test",1)
wait 1 s
GLCDPrint (0,0,"test",1)
wait 1 s
loop
This prints and erases "test" so xor works with chars.
I think it is because it writes the char rows but even with your guides and glcd is written in basic, it can be difficult for me to understand.
My code for ssd1306 is dated 2017.
It seems that xor changes the pset to xor and chars are plotted but seems they are not.
Clueless, stan
ssd1306 works with picomite which is 3.3V logic and no pullup resistors as it uses hard ware pin pull ups.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You program xor_texttest.gcb is different from the code above.
Why? In the demo have restored PSET and then call the XORPSET to draw the graphics. This way the glcdtext is displayed as expected and the graphics from the scope are XOR'd.
The updated demo - can you download this version as a new baseline.
'Draw the grid
line 0,GLCD_HEIGHT/2,128,GLCD_HEIGHT/2
line 63,0,63,63
do
glcdprint 60,20,"Test,1"
wait 1 s
glcdprint 60,20,"Test,1"
wait 1 s
loop
Does not xor chars
copy/pasted to synwrite as didn't know how to open new file and paste in gcstudio.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please update as you wish in GitHub. I can then 'update' to create the new Help.
The image does not shown in the GitHub source but it is shown in the attached CHM file. You will have to UNBLOCK the CHM if you download from this post.
Could you please point out a previous GCB example page how and what I have to fill in?
I think (Stan and) I could use an introduction on GCB-Github pages modification.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But, I will create a quick video to show the process of editing. I will assume you do not have a GitHub account and you want to edit locally ( on your PC ) and send back to the Forum for uploading to GitHub.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Stan, your post font type is set to very small :-)
But you are right that it will take me some time to achieve the "easy" level,
yet I will certainly try.
I think Anobium meant it's relative easy compared to other methods.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Stan
I'm not sure on your bread board setup with a lgt328 (LGT8F328P?) or a 328p nano?
And if I understand right the last modification Evan made in the PSET, XOR(PSET ) was not backwards compatible with previous written programs? I have none yet but working through most of the examples codes supplied to learn GCB in comparison with previous picaxe, pbp, mplab.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Haroen
LGT328 DID work, it is the adc voltage is 0V to 3.3V, so the graph is a line at the bottom of the screen until I touch the adc pin. Pin compatible with arduino nano 328.
I have not tried ssd1306 since 2017 from my file dates. Anobium has updated and I gave up with github. If I want a head ache I drink wine the night before :)
But, I will create a quick video to show the process of editing.
Looking forward to it :-)
I will assume you do not have a GitHub account and you want to edit locally ( on your PC ) and send back to the Forum for uploading to GitHub.
I used Github once in the past to only download code from someone else about a mechanical engineering study. So I do have a Github account and could learn how to use it for GCB.
In the earlier post here in this thread I was logged in Github to do this: https://sourceforge.net/p/gcbasic/discussion/579125/thread/0f10731cc9/?page=1#13eb
Last edit: Haroen 2023-01-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Out of interest-your base line xor on lgt328. 0V, 3.3V, 5V.
Tried running ssd1306 from 3.3V , works the same as 5V supply.
Not the same floating graph as arduino 328.
I tinkered with the code in that new demo.
I may have restored the ability to show characters and have the XOR graphics. Do try to see if characters now display.
I think the code can be optimised. So, please do adapt for performance. 〰️
Here is the source for the new page for Fonts and Characters = https://github.com/GreatCowBASIC/Help/blob/main/source/fontsandcharacters.adoc
Please update as you wish in GitHub. I can then 'update' to create the new Help.
The image does not shown in the GitHub source but it is shown in the attached CHM file. You will have to UNBLOCK the CHM if you download from this post.
How to change the Xscale (µs) in code easily?
Er... it's not a "real" oscilloscope :)
ptr2=ptr2+4 ;x position for start and end line x positions
This is the code I wrote for "oscilloscope". It is not the synwrite demo which just plots, this joins the dots.
I'll wire up a ssd1306 to a 328 and test this but I thought it was easy to redefine a char set anyway but never tried.
I never learnt how to use Github or download anything.
my xor scope video https://www.youtube.com/watch?v=AamRBAAmaZA
Last edit: stan cartwright 2023-01-02
I could replicate the issue and think this is still a character problem:
If I use "#Define GLCD_PROTECTOVERRUN" in the oscilloscope code and then stop the oscilloscope graphic and then try to display some text all is up-side-down and mirrored?
How could the Xscale multiplied by 2 or divided by 2?
Me neither, but I can supply Evan with the info for now.
Last edit: Haroen 2023-01-03
This sets xor and print and erases "test" although it's set to foreground
ie glcdprint (0,0,"test",1).
This must be dated code by Anobium.
I have not used ssd1306 on gcb for years.
inverts the text to black on white
This does not restore the large "hello".
Last edit: stan cartwright 2023-01-04
I tried the above code.
Thanks Stan, that makes sense.
Anobium- I found a bread board wired for ssd1306 and 3K9R pullups and 328 nano but it had a lgt328 on the board and it did not work.
I then remembered lgt328 is 3.3V logic and can not remember if it ever worked. Code was changed to #chip lgt328.
Changing to 328p nano, same pinout and it worked?
Does it need a logic level converter like ili9341 does with arduino 328p nano as ili9341 is 3.3V logic but the other way around that ssd1306 is 5V logic and lgt328 is 3.3V logic... if you follow my drift?
I dont know the answer. The max operating voltage of the GLCD Is the constraint. The operating of the micro-controller needs to match the operating voltage of the GLCD.
Why does this not restore large hello?
GLCDPrintLargeFont 0,0, "HELLO"
do
GLCDPrint (0,0,"test",1)
wait 1 s
GLCDPrint (0,0,"test",1)
wait 1 s
It doesn't restore a line
line 0,4,48,4,1
do
GLCDPrint (0,0,"test",1)
wait 1 s
GLCDPrint (0,0,"test",1)
wait 1 s
Does the program use XOR or stock PSET?
My above code xor flashing "test".
do
GLCDPrint (0,0,"test",1)
wait 1 s
GLCDPrint (0,0,"test",1)
wait 1 s
loop
This prints and erases "test" so xor works with chars.
I think it is because it writes the char rows but even with your guides and glcd is written in basic, it can be difficult for me to understand.
My code for ssd1306 is dated 2017.
It seems that xor changes the pset to xor and chars are plotted but seems they are not.
Clueless, stan
ssd1306 works with picomite which is 3.3V logic and no pullup resistors as it uses hard ware pin pull ups.
Attach, don't insert/post, your code. I wouldbe guessing without the code.
This the above code you could have copied/pasted.
This just an observation from Haroen's posts mentioning xor.
I never tried xoring chars before.
You program xor_texttest.gcb is different from the code above.
Why? In the demo have restored PSET and then call the XORPSET to draw the graphics. This way the glcdtext is displayed as expected and the graphics from the scope are XOR'd.
The updated demo - can you download this version as a new baseline.
https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/GLCD_Solutions/GLCD_Simple_Oscilloscope
OK, copy/pasted from link
commented
'Footer
'© 2023 GitHub, Inc.
'Footer navigation
'Ter
and it worked although very different to my scope I posted as thank you for writing xor code.
You do the code and I try to show examples/videos.
If this is a base line can it be stripped to just text for testing?
'Draw the grid
line 0,GLCD_HEIGHT/2,128,GLCD_HEIGHT/2
line 63,0,63,63
do
glcdprint 60,20,"Test,1"
wait 1 s
glcdprint 60,20,"Test,1"
wait 1 s
loop
Does not xor chars
copy/pasted to synwrite as didn't know how to open new file and paste in gcstudio.
@anobium
Could you please point out a previous GCB example page how and what I have to fill in?
I think (Stan and) I could use an introduction on GCB-Github pages modification.
@haroen
Fair questions.
An example page is https://github.com/GreatCowBASIC/Help/blob/main/source/glcdoverview.adoc
But, I will create a quick video to show the process of editing. I will assume you do not have a GitHub account and you want to edit locally ( on your PC ) and send back to the Forum for uploading to GitHub.
Here is a video to help understand the process. I am now using GC Code as the editor - it is by far the easiest method.
https://youtu.be/KTVXqQFbm64
Thank you so much for helping.
Evan
People's opinion of easy are different but thanks for your time and effort.
Hey Stan, your post font type is set to very small :-)
But you are right that it will take me some time to achieve the "easy" level,
yet I will certainly try.
I think Anobium meant it's relative easy compared to other methods.
@Stan
I'm not sure on your bread board setup with a lgt328 (LGT8F328P?) or a 328p nano?
And if I understand right the last modification Evan made in the PSET, XOR(PSET ) was not backwards compatible with previous written programs? I have none yet but working through most of the examples codes supplied to learn GCB in comparison with previous picaxe, pbp, mplab.
@Haroen
LGT328 DID work, it is the adc voltage is 0V to 3.3V, so the graph is a line at the bottom of the screen until I touch the adc pin. Pin compatible with arduino nano 328.
I have not tried ssd1306 since 2017 from my file dates. Anobium has updated and I gave up with github. If I want a head ache I drink wine the night before :)
@Anobium
Looking forward to it :-)
I used Github once in the past to only download code from someone else about a mechanical engineering study. So I do have a Github account and could learn how to use it for GCB.
In the earlier post here in this thread I was logged in Github to do this: https://sourceforge.net/p/gcbasic/discussion/579125/thread/0f10731cc9/?page=1#13eb
Last edit: Haroen 2023-01-08
Out of interest-your base line xor on lgt328. 0V, 3.3V, 5V.
Tried running ssd1306 from 3.3V , works the same as 5V supply.
Not the same floating graph as arduino 328.
Last edit: stan cartwright 2023-01-08
I wonder why? The speed of the processor?