P16F1827 and LCD Problems


Closed Thread
Results 1 to 29 of 29

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bobw55 View Post
    I am new to all of this:
    I have triple checked my wiring to the PIC<16F1827> and LCD as follows:

    PIC LCD
    RB0 = D4
    RB1 = D5
    RB2 = D6
    RB3 = D7
    RB4 = RS
    RB5 = E
    The R/W is tied to ground. VCC = +5 volts.
    I have tried just about every sample program I could find on this forum and they will either not compile (Pic Basic Pro) or I could not figure out the correct ports to change around to match my configuration. I am using a PICKIT3 to program with and it does see and properly identify my chip.
    Would be wonderful if someone could point me at some proper sample code to just initialize the LCD.... let alone make it say hello.
    I have not done any PIC programming, and haven't done much basic programming since the days of my Atari 800. Most of the compile errors I was receiving were stating that "Program" was expected. Newbie error I guess.
    Some one please re-aim my compass
    Hello Bob,
    To be clear, you DO / Do Not have the Pic Basic Pro compiler from MeLabs?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Dec 2010
    Location
    Michigan
    Posts
    31


    Did you find this post helpful? Yes | No

    Talking

    I only have the demo version which does NOT support the 16F1827.
    I have:
    MPLAB 8.63 PICKIT3
    MikroBasic
    MikroC-Pro
    MikroPro-Suite

    I found the Assembly template file for the 16F1827 and will start using that to build with.
    From my reading last night I figured out that I have to define or tell the program the pinout of the LCD to the PIC. Set the LCD for 4bit High nibble, then I can send the initialization string to it. (I think)
    My first goal is just to get it to Initialize.
    Second Print some text.
    Third read and display the value of a switch.
    I will do this, even if it takes a sledge hammer

  3. #3
    Join Date
    Dec 2010
    Location
    Michigan
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Getting there

    Managed to get some code written and displayed.

    THANK YOU ALL FOR THE POINTERS


    Bob
    Attached Images Attached Images  

  4. #4
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default



    Awesome Bob!!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  5. #5
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default

    Well Done Bob!
    Thanks and Regards;
    Gadelhas

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Now how about sharing it for humanity purpose
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hello BobW

    About "your" MikroC Pro program ...

    1) are you sure it has been written ( by you ??? ) for a '1827
    2) did you create a project ??? ( the " module " error comes from here )

    once " trimmed " it gives :

    0 1 mikroCPIC1618.exe -MSF -DBG -pP16F1827 -DL -O11111114 -fo8 -N"C:\Program Files\Mikroelektronika\mikroC PRO for PIC\Examples\tEST.mcppi" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for PIC\defs\" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for PIC\Uses\P16_Enh\" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for PIC\Examples\" "tEST.c" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl" "__Lib_ADC.mcl" "__Lib_LcdConsts.mcl" "__Lib_Lcd.mcl"
    0 1139 Available RAM: 368 [bytes], Available ROM: 4096 [bytes]
    0 126 All files Preprocessed in 50 ms
    0 122 Compilation Started tEST.c
    63 123 Compiled Successfully tEST.c
    0 127 All files Compiled in 80 ms
    0 1144 Used RAM (bytes): 63 (17%) Free RAM (bytes): 305 (83%) Used RAM (bytes): 63 (17%) Free RAM (bytes): 305 (83%)
    0 1144 Used ROM (program words): 1198 (29%) Free ROM (program words): 2898 (71%) Used ROM (program words): 1198 (29%) Free ROM (program words): 2898 (71%)
    0 125 Project Linked Successfully tEST.mcppi
    0 128 Linked in 210 ms
    0 129 Project 'tEST.mcppi' completed: 451 ms
    0 103 Finished successfully: 30 janv. 2011, 18:02:00 tEST.mcppi
    1198 ROM .... should compile fine with the demo version, no ???

    [HUMOUR ON]

    How much with PBP ????

    nooooooo .... not on the head !!!


    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts