I have adapted for a generic GLCD and changed a few things to use more of Great Cow BASIC - if this acceptable. I would like to move into the demo folders. Is this ok? I can update header to retain copyrights etc
Fine by me. You might make it hard to follow if you use too many features though, like Not Tron game. I couldn't follow your version where it was reduced to "if game = true then" a bit :)
I learn a lot from example/demo code. You can mess about with it and see the results and adapt it for something else. I was inpired by all the arduino projects on youtube and forums. Be fair, you can find arduino demos of most things a micro controller user might make. Either that or pic forums and more C or assembler.
Posting youtube videos creates maybe a search result so I mention GCB in the title. I should have put ssd1306 in the title so it appeared in a search if someone looked it up.
I'm trying various electrical/electronic items that appear on amazon or ebay advertised as for arduino or raspberry pi and getting them working with GCB. eg the glcd touch screen feature on ili9341.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I noticed today.Mine wasn't thoroughly de-bugged. Digital as well is a good idea. It looks nice and simple and the code is simple, it's all under the bonnet. Why did I think for years that include files were pre compiled asm code and so never looked what was inside them? I dunno.
I looked in ADS7843 library..yes I did :( a few times
PS I just noticed error but it works?? no error message. Suggests step minus value not needed for step -1
for radius=144 to 141
dial
next radius
Last edit: stan cartwright 2017-07-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What a cracking little project Stan, I am going to try to impliment your code onto my 16F18326 and SSD1307display, TinyBootloader and I2C bus. I have no doubt this is going to be another mammoth task. Any tips and pointers would be appreciated..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Keith. They're interesting displays and GCB makes them so easy to use. The ILI9341 touch glcd with sd card slot is <£5 and better to experiment with-more pixels and colour. spi is only 4 wires.
Have fun :)
ps..just enough ram :)
Last edit: stan cartwright 2017-07-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
;;;;Analogue 5V voltmeter by Stan Cartwright.
;;; Modified for 16F18326, GLCD SSD 1306, TinyBootloader & I2C Bus
;;; The GLCD SSD1307 is connected to the I2C Bus CLK & DAT as is an
;;; I2CEEPROM for further development.
Kieth, Anobiwan posted multiply adc by 100 and scale and str code but I didn't write that but I could do it totally different so avoiding plagueism :) and post that cos I didn't think off it first :)
Nice the way he did it by scaling and converting to str then testing chrs for decimal point. A challenge
hint:- 0 to 255 analogue is 0 to 5V
255*100=25000 divide by 5=5100
25500/51=500
25400/51=498 point 498
some where getting I am
Last edit: stan cartwright 2017-07-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK Keith, I sorted it for DVM different to Anobium's method. Two more vars and extra code. Cut and paste to your code. PS youtube didn't open your video for me :(
Do it justice by using bits for your own thing, I do with other's code. Good way to learn. no ascii 184
Keith, I dunno how you program your pics that disagrees with you. I use pickit2 and configure the GCB pic prog tool and it's as easy as arduino with bootloader. The in-circuit is a cap,resistor and diode on microchip info. It's so simple when you're aware of it. I was flashing pic hex files and using Xloader for mega328 before I twigged. ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not quite sure I follow what you mean here Stan, the 16F18326 is an extremely versatile little device with a 32Mhz clock, 28Kb of Flash memory, 2Kb of SRAM and 256B of EEPROM. On the negative side, it is a right faff on programmed with the conventional PICKit as you need to use MPLAB ICE, however using the TinyBootloader, it’s a breeze.
I use Atmel Studio and an AVRDragon to program ATtiny devices.
I don’t want to know anything about ‘Arduino’ is he an Italian Ice Cream Man from Venice !
Last edit: Keith 2017-07-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To extend the functionality even further how about adding Average and Peak Values to the Left and Right of the pivot point. That would then need a display reset input to the micro.
Cheers
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Keith, I looked up 16F18326 and thought it said 1024 ram. I didn't know it was a job to prog either. I suppose I'll have to use tiny boot loader and usb to serial eventually. I bought a 18f2550 and 18f2650. One has usb but I haven't tried it.
Chris, I was just testing trig but for a VU meter then peak hold with second needle for 1 second easyish. It's easy to convert to something else. I thought of a "radar" display using a distance sensor. Also how to move a point from the x/ycentre to the x/yend adapting the line draw routine if you follow how a line is drawn. Dunno why though :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Last post on this project, time of flight range finder arrived today.
Anobiums version did not update needle or volts unless it had changed so the needle doesn't flicker.
This final code does that. (is it different Anobium?) I also fixed the 0.0x error. It was 0.x.
The pot is noisy. https://youtu.be/d51PTF8Boh0
An analogue meter type display on a 128x64 GLCD measuring 0 to 5 volts. No UDGs.
https://youtu.be/0hoSBhGgmyc
Love it.
I have adapted for a generic GLCD and changed a few things to use more of Great Cow BASIC - if this acceptable. I would like to move into the demo folders. Is this ok? I can update header to retain copyrights etc
Fine by me. You might make it hard to follow if you use too many features though, like Not Tron game. I couldn't follow your version where it was reduced to "if game = true then" a bit :)
I learn a lot from example/demo code. You can mess about with it and see the results and adapt it for something else. I was inpired by all the arduino projects on youtube and forums. Be fair, you can find arduino demos of most things a micro controller user might make. Either that or pic forums and more C or assembler.
Posting youtube videos creates maybe a search result so I mention GCB in the title. I should have put ssd1306 in the title so it appeared in a search if someone looked it up.
I'm trying various electrical/electronic items that appear on amazon or ebay advertised as for arduino or raspberry pi and getting them working with GCB. eg the glcd touch screen feature on ili9341.
Code was attached. Only changes were to glcd, add your name and removal of an errant command.
Regardingv Touch. Please use ADS7843 library. This is a published library.
I noticed today.Mine wasn't thoroughly de-bugged. Digital as well is a good idea. It looks nice and simple and the code is simple, it's all under the bonnet. Why did I think for years that include files were pre compiled asm code and so never looked what was inside them? I dunno.
I looked in ADS7843 library..yes I did :( a few times
PS I just noticed error but it works?? no error message. Suggests step minus value not needed for step -1
Last edit: stan cartwright 2017-07-10
A picture of meter with your digital display and no change to current needle value.
Displaying uno 3.3 volt output.
What a cracking little project Stan, I am going to try to impliment your code onto my 16F18326 and SSD1307display, TinyBootloader and I2C bus. I have no doubt this is going to be another mammoth task. Any tips and pointers would be appreciated..
@Kieth - post your code.. when you have completed... it can go into the release!
So far So good . No major headaches as yet
BLUE TAC!!!! Nice method.
Oh Wow.. That would be an honour indeed Sir.!!!!
Hi Keith. They're interesting displays and GCB makes them so easy to use. The ILI9341 touch glcd with sd card slot is <£5 and better to experiment with-more pixels and colour. spi is only 4 wires.
Have fun :)
ps..just enough ram :)
Last edit: stan cartwright 2017-07-11
I have ordered one of Fleabay £3.83 inc shipping from China something else to play around with - Thanks
Video of Project
https://youtu.be/QRfyIjr72MM
;;;;Analogue 5V voltmeter by Stan Cartwright.
;;; Modified for 16F18326, GLCD SSD 1306, TinyBootloader & I2C Bus
;;; The GLCD SSD1307 is connected to the I2C Bus CLK & DAT as is an
;;; I2CEEPROM for further development.
The code as attached
@ Stan. Hope I have done you justice with my offerings old friend.
Did you publish the code ammendment for the digital readout as in your image SAM1670.jpg?
Kieth, Anobiwan posted multiply adc by 100 and scale and str code but I didn't write that but I could do it totally different so avoiding plagueism :) and post that cos I didn't think off it first :)
Nice the way he did it by scaling and converting to str then testing chrs for decimal point. A challenge
hint:- 0 to 255 analogue is 0 to 5V
255*100=25000 divide by 5=5100
25500/51=500
25400/51=498 point 498
some where getting I am
Last edit: stan cartwright 2017-07-11
OK Keith, I sorted it for DVM different to Anobium's method. Two more vars and extra code. Cut and paste to your code. PS youtube didn't open your video for me :(
Do it justice by using bits for your own thing, I do with other's code. Good way to learn. no ascii 184
Last edit: stan cartwright 2017-07-11
Keith, I dunno how you program your pics that disagrees with you. I use pickit2 and configure the GCB pic prog tool and it's as easy as arduino with bootloader. The in-circuit is a cap,resistor and diode on microchip info. It's so simple when you're aware of it. I was flashing pic hex files and using Xloader for mega328 before I twigged. ;)
Not quite sure I follow what you mean here Stan, the 16F18326 is an extremely versatile little device with a 32Mhz clock, 28Kb of Flash memory, 2Kb of SRAM and 256B of EEPROM. On the negative side, it is a right faff on programmed with the conventional PICKit as you need to use MPLAB ICE, however using the TinyBootloader, it’s a breeze.
I use Atmel Studio and an AVRDragon to program ATtiny devices.
I don’t want to know anything about ‘Arduino’ is he an Italian Ice Cream Man from Venice !
Last edit: Keith 2017-07-12
Looks like Anobium's DVM but his doesn't update anything if the input hasn't changed.
uno 3.3v out again. results is usually 3.29..flickers
Last edit: stan cartwright 2017-07-12
Looks great Stan,
To extend the functionality even further how about adding Average and Peak Values to the Left and Right of the pivot point. That would then need a display reset input to the micro.
Cheers
Chris
Keith, I looked up 16F18326 and thought it said 1024 ram. I didn't know it was a job to prog either. I suppose I'll have to use tiny boot loader and usb to serial eventually. I bought a 18f2550 and 18f2650. One has usb but I haven't tried it.
Chris, I was just testing trig but for a VU meter then peak hold with second needle for 1 second easyish. It's easy to convert to something else. I thought of a "radar" display using a distance sensor. Also how to move a point from the x/ycentre to the x/yend adapting the line draw routine if you follow how a line is drawn. Dunno why though :)
Last post on this project, time of flight range finder arrived today.
Anobiums version did not update needle or volts unless it had changed so the needle doesn't flicker.
This final code does that. (is it different Anobium?) I also fixed the 0.0x error. It was 0.x.
The pot is noisy. https://youtu.be/d51PTF8Boh0
Last edit: stan cartwright 2017-07-12
Thought I posted edit. This works in front of me at turn on with any input 0 to 5V.
Anobium pointed out errors I didn't see. Sorry,doh. Please test.
Works a treat on a 16f1939 with a KS0108 GLCD.
I have added header and moved to the new release of Great Cow BASIC. Thank you for sharing with the community.
See https://sourceforge.net/projects/gcbasic/files/Demonstration%20Files/GLCD%20%20Solutions/GLCD%20Voltmeter%20Solutions/
Last edit: Anobium 2017-07-14