I was originally try to just get some text onto the screen, which after battling I reallised that I had one of the data pins (DB6) was connected to PORTA.5 of the 16F628, which was an input only pin, so I moved them on up and it worked, well for a short while, untill my PICKit2 couldn't detect the chip anymore? so replaced the chip and got it working again.
but here is the problem, I'm wanting to view the analog input on the screen and not sure how to do this. I first moved the RS LCD pin to an unused pin (PORTB.5) and confirmed operation.
I then connected a voltage of about 4V (from the contrast pot) to pin PORTA.0 (AN0). I then used "POT" icon to read on PORTA.0 and named the variable to "analog" and set it to BYTE ("type") correct?
I then used the "Print" function to print that variable to screen, but I just get a "0" with the cursor flashing next to it.
I will eventually need to be able to scale the analog referance so that 0V-5V input will represent 0 - 30 on the LCD, basically its going to be a voltmeter.
Any help will be appreciated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You cant read analog voltages with a 16F628 as it doesnt have an A/D converter in it.
You need a chip like a 16F88 or a better chip like a 16F886.
If you only want to do something very simple then a 12F675 will work also.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All
I'm a new to uC and need a bit of help.
I was originally try to just get some text onto the screen, which after battling I reallised that I had one of the data pins (DB6) was connected to PORTA.5 of the 16F628, which was an input only pin, so I moved them on up and it worked, well for a short while, untill my PICKit2 couldn't detect the chip anymore? so replaced the chip and got it working again.
but here is the problem, I'm wanting to view the analog input on the screen and not sure how to do this. I first moved the RS LCD pin to an unused pin (PORTB.5) and confirmed operation.
I then connected a voltage of about 4V (from the contrast pot) to pin PORTA.0 (AN0). I then used "POT" icon to read on PORTA.0 and named the variable to "analog" and set it to BYTE ("type") correct?
I then used the "Print" function to print that variable to screen, but I just get a "0" with the cursor flashing next to it.
I will eventually need to be able to scale the analog referance so that 0V-5V input will represent 0 - 30 on the LCD, basically its going to be a voltmeter.
Any help will be appreciated
Aslo, are there any tutorials on GCBasic Graphical?
Thanks
You cant read analog voltages with a 16F628 as it doesnt have an A/D converter in it.
You need a chip like a 16F88 or a better chip like a 16F886.
If you only want to do something very simple then a 12F675 will work also.
Please help me to do it with a pic 16f676