MPLab IDE Project


Closed Thread
Results 1 to 7 of 7
  1. #1
    BRINGERofBACON's Avatar
    BRINGERofBACON Guest

    Default MPLab IDE Project

    howdy, i've just begun using MPLab and PIC programming and have no clue as to how i should go about doing this project. i understand what it wants me to do, i just can't come up with the code to do it.

    im using the 16f84a device

    basically i need to implement a serial to parallel converter with an RS-232 communications standard.

    as i understand it, when a byte of data comes in (through the pin RA0), the start bit is detected. and then after delaying 1.5 periods, bit sampling occurs every period until all 8 bits are sampled. then i need to copy this parellel data to portb and set the 'DA' flag (which is assigned to pin RA1) to high when new data is available. the output needs to be double-buffered.

    i have a basic outline of how things should be done, but how exactly do i code this?

    thanks for any help

  2. #2
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Use Serin to put a byte into 'var' ; If you don't use an RS232 level converter, you will need to do it with the Serin statement. Check the manual.

    PortB = var
    high PortA.0

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ron Marcus View Post
    Use Serin to put a byte into 'var' ; If you don't use an RS232 level converter, you will need to do it with the Serin statement. Check the manual.
    PortB = var
    high PortA.0
    Doesn't say he's using PBP though...

    Looks like another job for good ol' blinky LED first...

  4. #4
    Join Date
    Sep 2006
    Posts
    18


    Did you find this post helpful? Yes | No

    Default First thing first

    I agree with RON MARCUS.

    The PIC16F84A does not have a serial port, so you MUST use SERIN and/or SEROUT.


    As stated by SKIMASK, you need to define which compiler you're using.


    And on a personal note:
    It appears you need homework done. I recommend reading the sample programs provided in the PBP folder.


    PS: Forgive my english, it's a little rusty.

  5. #5
    Join Date
    Apr 2008
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Using MPLab he is probably using MPASM. ?

    foss

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Or Perhaps, If we knew what kind of Bacon you were Bringing to the table?

    <table><tr><td><img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2556&stc=1&d=120978075 6" width=210 height=157 /></td><td><img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2557&stc=1&d=120978075 6" width=210 height=157/></td></tr></table>

    The one on the left could inspire me to write a whole program!

    The one on the right... not so likely.
    <br>
    Attached Images Attached Images   
    DT

  7. #7
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    This one does not require a separate power supply...
    Attached Images Attached Images  

Similar Threads

  1. picbasic pro and mplab IDE
    By soelinnhtet in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st March 2010, 08:57
  2. Replies: 0
    Last Post: - 13th February 2009, 03:34
  3. Upgraded to MPLAB IDE 8.14 and now I'm stuck
    By BlueHairBob in forum General
    Replies: 2
    Last Post: - 20th August 2008, 01:15
  4. PBP and MPLab IDE
    By Perrin` in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th May 2008, 14:09
  5. Using PICBASIC PRO in MPLAB IDE
    By jblackann in forum General
    Replies: 8
    Last Post: - 4th May 2008, 09:20

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