Please help with EDE702 - Serial to LCD interface


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    '*****************************************************************
    ' Using PortB.2 to serially transfer data to EDE702
    ' PortB.2 going to EDE702's RCV port (pin 17)
    ' LCD connected to EDE702
    ' Internal OSC used for 16F628A
    ' 4 MHZ cristal used for EDE702
    '*****************************************************************
    @ DEVICE PIC16F628A, INTRC_OSC_NOCLKOUT, WDT_OFF, LVP_OFF, PWRT_OFF, PROTECT_OFF, BOD_OFF
    Use an external crystal and see what happens.
    And if you don't have one, since you DO have an o-scope, might want to change the program, make it change the portb.2 line at a known rate, check it with the o-scope and see how far off (if any) your internal oscillator is.
    Also, check Appendix A of your PBP manual. 9600 baud at 4mhz is a bit iffy. Try 2400 baud, try a higher clock, try using the hardware UART, try anything.
    Last edited by skimask; - 28th October 2008 at 16:31.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Tom,
    Can you post a schematic of the way you have things connected.

    And

    Try connecting to a PC using hyper terminal or something, this will test your PIC and code.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Check out this post, code in post 16.
    http://www.picbasic.co.uk/forum/showthread.php?t=4972
    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.

  4. #4
    Join Date
    Oct 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    mackrackit,
    I didn't draw a schematic, just used/modified the one from the EDE702 datasheet. I'm attaching both the datasheet and a simplified schematic.
    Note the schematic shows line coming from the PS's serial port but in my case the line is coming from the PIC.
    Joe,
    I read the whole topic and while the code works, it is too complex for me. Plus I'd have to have MPASM and compile using that... Not sure how to go about that.
    Post #25 looks promissing and I can actually understand it!
    I'll try that one first and if it's loosing characters then I'll try to use yours.

    Thanks,
    Tom
    Attached Images Attached Images  
    Attached Images Attached Images

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    In your original program, change BAUD CON 2 to BAUD CON 6 and see what happens...
    Key phrase here is:
    Note the schematic shows line coming from the PS's serial port but in my case the line is coming from the PIC.
    The PBP manual will tell you why this matters...

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    If you are using the schematic posted... you did ground the OSC? The schematic is missing that.

    MPASM is simple. Just install MPLAB from microchip (it is on your PBP CD) and tell MCS to use MPASAM.

    The only thing you may need to do is change your configs for MPASM. Not a big deal.
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Your problem is the internal oscillator. As already suggested in post#4, use a 4 MHz xtal or a resonator also for the pic, and you will see that the serial communication will work.

    Al.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Your problem is the internal oscillator. As already suggested in post#4, use a 4 MHz xtal or a resonator also for the pic, and you will see that the serial communication will work.
    Al.
    Might not be the internal osc though...
    As has been pointed out somewhere (don't remember where) before, those internal oscillators aren't as loose as they used to be...unless of course it's an older chip in the first place.

Similar Threads

  1. LCD serial backpacks
    By Archangel in forum Serial
    Replies: 67
    Last Post: - 30th December 2010, 05:51
  2. Replies: 33
    Last Post: - 19th March 2010, 04:02
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 17:56
  4. Serial LCD
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2007, 09:31
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 27th June 2007, 00:07

Members who have read this thread : 0

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