Starting over with PICBasic Pro 3


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2013
    Posts
    16

    Default Starting over with PICBasic Pro 3

    Last year, I made a little progess with PICs, but not much. Now, I am trying again and remember why I gave up: total confusion.

    I have a working 16F84A on a homemade breadboard assembly. I have a 16 x 2 LCD to which I have connected a Modern Device serial backpack.

    I have MPLAB version 8.89 installed, and a PICKit 2. I have PBP3 Gold installed.

    Would someone please give me some Hello World code that runs, and a connection scheme? I think if I can just get one thing working, I can move on from there.

    Thanks.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: Starting over with PICBasic Pro 3

    May be you could find a starting point here C:\PBP3\EXAMPLES\General PBP\LCD Yesss ... it's an "adress" inside YOUR computer !

    ... the following step being using the "SEROUT" command in your holy manual ...

    surprising ?

    Alain
    Last edited by Acetronics2; - 4th March 2013 at 07:20.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  3. #3
    Join Date
    Jan 2013
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: Starting over with PICBasic Pro 3

    If I hadn't already read the manual and tried (unsuccessfully) everything in it that seemed remotely possible, I wouldn't have asked for someone to "please give me some Hello World code that runs, and a connection scheme." I would be grateful to anyone here who would do that.

    To those who aren't so inclined, I regret that I wasted your time reading my post. However, I don't need to be made to feel any more ignorant than I already feel.

    Thanks.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Starting over with PICBasic Pro 3

    Hi,
    The first thing you need to do is get a simple LED blinking at a frequency you determine. Once you've got that going you know that the PIC is running and that it's running at the correct frequency.
    Here's a schematic for the 16F628 that I did for another thread the other day, it would look very similar for the 16F84 but you need to double check and possibly "convert" the pin-numbers so that they match.
    Name:  16F628-setup.JPG
Views: 703
Size:  27.3 KB

    If you need more help then please post a schematic and/or photo of your setup and the code you're using.

    Once you've got the LED blinking you can move on to the LCD. If you need more help with that part then same thing applies, post schematics and code, link to documentation on the serial backpack etc would be usefull as well. Perhaps it's designed to driven at proper RS232 levels and not at logic level....?

    /Henrik.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,810


    Did you find this post helpful? Yes | No

    Default Re: Starting over with PICBasic Pro 3

    Do you have communication between F84 and Pickit2?

    Ioannis

  6. #6
    Join Date
    Jan 2013
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: Starting over with PICBasic Pro 3

    For the benefit of anyone who might land on this thread in the future, here's some code that works.

    '************************************************* ***************
    '* Name : Serial LCD.pbp *
    '* Author : tracecom *
    '* Notice : *
    '* : *
    '* Date : 3/5/2013 *
    '* Version : 1.0 *
    '* Notes : PIC16F84A *
    '* : Modern Device LCD117 Serial Adapter & 2x16 LCD. *
    '************************************************* ***************

    Include "modedefs.bas"
    serout 0,T2400,["?BFF"] ' Set LCD backlight to maximum brightness.
    PAUSE 200 ' Pause to allow LCD EEPROM to program.
    SEROUT 0,T2400,["?G216"]' Configure the LCD geometry: 2x16.
    PAUSE 200 ' Pause to allow LCD EEPROM to program.

    main:
    pause 1000 ' Wait for the LCD to startup.
    serout 0,T2400,["?f"] ' Clear the screen.
    pause 1000 ' Wait one second.
    serout 0,T2400,["Wherever you go,"] ' Send the string "Wherever you go,".
    serout 0,T2400,["?m"] ' Move the cursor to the second line.
    serout 0,T2400,[" there you are."] ' Send the string " there you are."
    pause 1000 ' Wait one second.
    goto main ' Do it again.


    ETA: I do get an error message from the PICkit2: Verification of configuration failed.
    But the LCD works.
    Last edited by tracecom; - 5th March 2013 at 23:59.

Similar Threads

  1. Moving from Basic Stamp and MIKROE basic to PicBasic PRO
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 40
    Last Post: - 6th March 2013, 05:27
  2. Replies: 7
    Last Post: - 24th December 2012, 20:41
  3. Wake from sleep (Well, sorta) 16F88, PICBASIC PRO
    By SFOdesigns in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2012, 14:43
  4. Set the starting time with ds1302 picbasic
    By crisxstyle in forum Off Topic
    Replies: 9
    Last Post: - 30th September 2008, 15:14

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