Author Topic: LCD PIC16F84 MPLAB  (Read 7208 times)

0 Members and 1 Guest are viewing this topic.

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: LCD PIC16F84 MPLAB
« Reply #25 on: June 15, 2016, 02:17:33 am »
That would fix it.  The default RC mode doesn't work with crystals!

For future reference:  MPLAB X has a GUI wizard that lets you pick all the CONFIG options you want for the PIC type in the active project, then you can click a button to generate CONFIG source code to paste into your main C file (outside of any functions).
http://microchip.wikidot.com/mplabx:view-and-set-configuration-bits
It makes it a *lot* easier to get a valid CONFIG, especially on the more complex chips with many CONFIG registers.

If Arduino code looks prettier, its only because of the complex hardware abstraction layers hidden away in the standard wiring libraries.  If you are hitting the bare ATmega metal directly, it can look just as complex as PIC  HiTech or XC8 code.
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: LCD PIC16F84 MPLAB
« Reply #26 on: June 15, 2016, 02:25:26 am »
I will look into arduino in the near future

Tomorrow i am going shopping to get some 16F628 at a reasonable price $7.45
and maybe 16c711 @ $12.95 or just look online.
Would like a few more ports. 28 or 40 pin the worlds my oyster.

Once again.
Thank you to everyone for you help in teaching an old dog new tricks.
BILL.
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: LCD PIC16F84 MPLAB
« Reply #27 on: June 15, 2016, 02:35:53 am »
BTY You might like to look at this schematic i found online.
the contributer had built an addon for his GPS.
pretty shonky
 note the pot wiring and values.

BILL.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2548
  • Country: us
Re: LCD PIC16F84 MPLAB
« Reply #28 on: June 15, 2016, 02:37:25 am »
I may start to look at Arduino or Cherry pi in the future but then that's another code to learn, bu isn't that what life's for
True, but whatever code you'D write with the Arduino IDE is a helluva lot more human readable than the mess required to keep anything in the PIC world happy.
I only know what it is because I've been using it for almost a couple decades.  If I had to do it again, it would be via an Arduino type of thing.
C code is C code.  You can make it as readable or unreadable as you like no matter what platform is running it.
Take it from someone who has been writing code in various languages for 35+ years.

Tomorrow i am going shopping to get some 16F628 at a reasonable price $7.45
and maybe 16c711 @ $12.95 or just look online.
Would like a few more ports. 28 or 40 pin the worlds my oyster.

I would suggest a pic16f886 for $2.46 or a pic18f2550 for $5.16 from Mouser.  Both are 28 pin packages.  The pic18f2550 is a little more difficult to program but would be an easy next step in difficultly and is used in the PICkit 2.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: LCD PIC16F84 MPLAB
« Reply #29 on: June 15, 2016, 02:53:55 am »
The PIC18F2550 is a USB PIC.  If you are not using its USB device interface, that limits your clock options and the USB hardware takes up pins.    Also the Microchip USB stack has a fairly steep learning curve.   For general non-USB use, you'd be better off with the 28 pin PIC18F2520, or possibly the PIC18F25K22, although that one's a bit more feature rich and complex.

Also the PIC16F88 is well worth a look if you want a standard midrange 18 pin PIC, that in many applications is pin compatible with a PIC16F84(A) with only minor code changes, but has most of the newer features (including debugging) of the PIC16F886 in a lower pin-count.   

For all the PICs mentioned above by myself and Mark, if you want in-circuit debugging, your target board must not use the RB6, RB7 and /MCLR pins.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf