Please help with EDE702 - Serial to LCD interface


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Oct 2008
    Posts
    21

    Exclamation Please help with EDE702 - Serial to LCD interface

    Hi,
    I've been looking at creating a serial LCD for a while and came across an EDE702 - Serial to LCD Interface IC by Elabinc:

    http://www.elabinc.com/Semiconductor...7/Default.aspx

    It's a very sexy idea I thought using just a single line on the PIC to drive the LCD display (and it only costs around $7)

    So finally it arrives and I'm trying to get it to work. I've been strugling for a couple of days and searched the forums for the subject.

    Hooked up an oscilloscope to the PIC and it looks like it's sending some data, but the EDE702 isn't doing much (and the LCD is blank).
    Here's a test program

    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
    
    CMCON = 7                        ' Set portA to i/o
    TRISA = %00000000                ' outputs
    TRISB = %00000000                ' outputs
    
    BAUD            con 2            ' Serout T9600=2, N9600=6 
    
    WAIT_TIME       con 1000
    BLINK_DELAY     con 1000
    NUM_OFF_LASHES  con 3
    
    Serial_LCD      var PortB.2     ' Serial signal to EDE702
    Led             var PortB.5     ' heartbeat led to make sure PIC's alive
    ctr             var byte
      
    INS             con 254         ' LCD command mode parameter
    CLR             con 1           ' LCD clear command
    LINE1           con 128         ' LCD line 1  
    LINE2           con 192         ' LCD line 2  
      
    Main:
    
      pause wait_time
      
      ' Clear the LCD and print some text on it
      serout serial_lcd, BAUD, [ins,clr]
      serout serial_lcd, baud, [ins,line1,"Test"]
    
      ' Flash Led 3 times (to see PIC working) and turn EDE702's Digital port ON/OFF
      for ctr = 1 to num_off_lashes
      
        led = 1                                         ' led ON
        pause blink_delay
        serout serial_lcd, baud, [ins,%11111101]        ' Digital Output ON EDE702
        
        led = 0                                         ' led OFF
        pause blink_delay
        serout serial_lcd, baud, [ins,%11111100]        ' Digital Output OFF EDE702
    
      next ctr
    
    goto Main
    
    end


    Any help greatly appreciated,
    Thanks,
    Tom

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


    Did you find this post helpful? Yes | No

    Default

    Hi,

    You did not use the SEARCH function :

    http://www.picbasic.co.uk/forum/show...ghlight=EDE702

    Lol ...

    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 " !!!
    *****************************************

  3. #3
    Join Date
    Oct 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Hi Alain,
    I did use the search and found the topic you show along with 5 other topics. I also used the datasheet that came with the EDE702. Hooked everything up and tripple-checked it. (Maybe it's time to check it again...)

    I've never send serial data through the Pic's line before. So I'm thinking my program has bugs in it. That's why I was hoping that someone who used the EDE702 could shed some light on the thing.

    Thanks,
    Tom

  4. #4
    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 15:31.

  5. #5
    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.

  6. #6
    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.

  7. #7
    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

  8. #8
    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...

  9. #9
    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.

  10. #10
    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.

  11. #11
    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.

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


    Did you find this post helpful? Yes | No

    Default

    The schematic for the EDE702 uses a ceramic resonator, but your code comment suggests you are using a crystal.

    Did you add two 22-27pF capacitors on the crystal?
    <br>
    DT

  13. #13
    Join Date
    Oct 2008
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Hi,
    1. Tried BAUD CON 6 (instead of 2)..... no go
    2. The crystal on the EDE702 has two 22pF caps going to ground
    3. Haven't tried a crystal for the Pic (sender) but it's a '628A

    Will make the correct schematic and post it (right now I don't have access to a drawing program that will do schematics). Maybe I'll get access to Orcad tomorrow.

    I start to get a feeling that the EDE702 is just dead

    Till then thanks for your suggestions,
    Tom

  14. #14
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Tomexx View Post
    3. Haven't tried a crystal for the Pic (sender) but it's a '628A
    That's what I said to try in post 4.

Similar Threads

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

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