trouble with 2 x 16 ldr and pic - Page 1
Forum section: electronics / beginners

author: neko efecktz
author_rank: Regular Contributor
timestamp: May 21, 2016, 06:34:17 am
content: Please help me if anyone can. This may get lengthy.I think I have bitten off more than I can chew.About me...I'm 63 years old and not getting any younger.Total newbie to pics.A few weeks ago I decided to look into programming a few Pics to drive a 2 x 16 LCD.I have done some visual basic programming (many years ago) but decided to go the full hog and buy a Pickit 3 clone and learn C.How many versions of C are there?While I waited for it to arrive I downloaded MPLAB X IDE.I found that it has no or very little support for 2 x 16 LCD so I uninstalled it and found it didn't uninstall completely. It left a few folders and files behind. These are outlined in a previous post.I installed Microchip XC8 v1.37 and with a little help managed to get it running.I have so far been unable to get a program to work.I have downloaded complete projects including header files etc and still get errors.I have watched videos and using the Windows Snipping Tool (very handy tool) pause, copy / past to word and then printed it so I could type the code in.Just about every line in the code has an error mark in the line number column.Most of them have a message when I hover the mouse over the error flag likeUnable to resolve identifier Nop.Unable to resolve identifier SetDDRamAddr.When I try to build the program I always seem to get 2 errors that always seem to be the same.A snap shot included.I have also copy/pasted displayed files with the same results.My main idea is to have the Pic monitor various parts of my power supply.It comprises of two power supply boards running from 2 separate transformers i.e.two completely separate MonitoringOver current in both positive and negative supplies taken from the current limit led circuit.Variation of over say .25 volts between supplies using a window comparatorHeat sink temperature etc. Or at least over temperature.Every input will have an Opto Coupler for full isolation.The chips I have had for a few years bought in a bulk lot of components are PIC 16F84 20meg.Once I get a couple of projects working I will buy bigger and more versatile chips and try to do silly things like read the voltages and temperature and have this displayed and perhaps even a tiny speaker as an alarm just in case I don't see there is an alarm condition.Silly question but if I downloaded an earlier version than XC8 v1.37 would this help me get all of the required header files etc ?If so what would be a good version to try?I eagerly await any help I can get.

author: kripton2035
author_rank: Super Contributor
timestamp: May 21, 2016, 06:37:51 am
content: may be you could try some simplier IDE like the mikroe one here :http://www.mikroe.com/mikroc/pic/or even their basic ide is nicethere are libraries for the lcd and full help built in ...and they are free to use until you reach 2K of code, for an lcd drive it should be ok

author: Skimask
author_rank: Super Contributor
timestamp: May 21, 2016, 07:01:36 am
content: Did you buy the PIC16F84 or the PIC16F84A?Try compiling for the 16F84A instead and see what happens.Knowing Microchip, they probably forgot to add/remove/fix something for the 16F84 (non-A) as it's older than dirt.....and they'll call it a 'feature'.

author: neko efecktz
author_rank: Regular Contributor
timestamp: May 21, 2016, 10:40:09 am
content: the chip is Pic16F84 no AI forgot to ask in my post how do I link Isis Proteus to mplabwould you know?I tried changing the chip to PIC16F84A but still no better.