LCD Data on portA and portB


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    EDWARD's Avatar
    EDWARD Guest

    Default LCD Data on portA and portB

    I am ICSP programming a board with a 16f73 and 14 pin lcd among other devices. For some weird reason the developer of the board,whom i do not know, has put D7, D6, D5, D4 of the LCD to PINS PORTA.0, PORTA.1, PORTA.2, PORTB.3 on the 16f73 repectivley. yes i said PORTB.3 not PORTA.3. Its seems that the pins for the LCD are connected in reverse and not all on the same port.
    the last bit of information you should know is that there is a 256 eeprom chip connected serially to PORTB.1 AND PORTB.2.

    thus far LCDOUT has been unsucessful
    i have read tons of forums before posting



    CAN ANY OF you invision a work around?

    things to consider.

    i would like to use the LCDOUT command

    will using the eeprom to drive the LCD be an option? i.e load bytes from eeprom to the ports registers

    can i somehow make portB.3 do exactly what portA.3 does?

    '----------------------------------------the hardware\defs i have
    E is portC.1
    rs is portC.0
    R/W is grounded (write mode)
    Data0 to Data3 is not used
    I am in HS mode
    14 pin 2x8 lcd

    define LCD_DREG PORTA
    define LCD_DBIT 0
    define LCD_RSREG PORTC
    define LCD_RSBIT 0
    DEFINE LCD_EREG PORTC
    DEFINE LCD_EBIT 1
    define LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50

    'holla

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    EDWARD,

    I would modify the hardware to make it compatible with LCDOUT.

    You could cut the copper traces on the and re-wire them
    or build some adapter cable between the board and the LCD.

    Coud you post a schematic and Layout of your board?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #3
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    You can also manually control the LCD.. .with out using LCDout.

    http://www.geocities.com/SiliconVall...d/commands.htm

    YOu would send a
    hex 13 to turn on the LCD,
    Hex 01 to clear
    and everything else will be close to the same as a LCDout.

    You would send it in 4 bit mode, thus I can't remember if you send the MSB or LSB first...This may seem like a lot of work, but in reality, it is fairly simple.

    You can assign the whole PortB.0- PortB.3, then assign A.3 to Port b.3 and trigger your clock.

    Psuedo code:

    Turn your LCD into 4 bit mode:
    send Hex 13 to turn it on.

    // one way to do it:
    routine:
    Portb.0 - POrtb.3=MSB
    Porta.3=Portb.3
    toggle clock

    // another way to do it.
    Portb.0 - Portb.2=LSB
    Porta.3=Bit...(whatever it is)
    toggle clock
    Return


    Yeah, you are sending in 4 bit mode, but it will work. But you are not using LCDout. You will also have to put your own pauses in, so that the data will not be sent too fast. (similiar to Character spacing command in LCDout)
    Last edited by Dwayne; - 4th May 2005 at 16:06.
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  4. #4
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dwayne
    You can also manually control the LCD.. .with out using LCDout.
    Of course you could,
    even without using a PIC
    by simply having some DIP-Switches on the Data Lines and a PushButton on the Clock Line.

    (Dwayne, you remember my very first PROMmer)

    If you would like to use the Power of PBP's LCDOUT
    (like all the Modifiers etc.)
    you would have to write your own LCD Routines

    I feel cutting some traces on the PCB and soldering some wires or building an adapter cable will be less time consuming.

    BTW
    the "Dwayne Method" will only work if there is nothing connected to PortB.3
    (Means you are wasting one PortBit)
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  5. #5
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Ralph,


    Ralph>>Of course you could, even without using a PIC
    by simply having some DIP-Switches on the Data Lines and a PushButton on the Clock Line. (Dwayne, you remember my very first PROMmer)<<

    <chuckle> Yes I do...


    Ralph >>If you would like to use the Power of PBP's LCDOUT
    (like all the Modifiers etc.)
    you would have to write your own LCD Routines <<

    that is correct... And this is what I did... Granted the wheel has already been invented, but sometimes that wheel has to be made oblong to make something work a little bit better for other situations.

    Ralph >>I feel cutting some traces on the PCB and soldering some wires or building an adapter cable will be less time consuming.<<

    Yes...I agree...But I don't know what limitations our gent has... Would that be allowable for him???

    Ralph >>BTW
    the "Dwayne Method" will only work if there is nothing connected to PortB.3
    (Means you are wasting one PortBit)<<

    I showed two ways... One using a MSB / LSB the other is more of a Bit shift for the first 3 bits, and the 4th bit assigned to Porta. Lengthy...Yes...but sometimes skinning the cat can't be done the way we want it done...

    Thus I offered another solution, if the cat is not allowed to be skinned that way...Whether it helps or not...oh well... it is a option.
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  6. #6
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    ...Granted the wheel has already been invented, but sometimes that wheel has to be made oblong to make something work a little bit better for other situations.
    OK, if you want to prevent the wheel from turning, you could make it rectangular, but then I wouldn't call it a wheel any longer. (The proven best shape for a wheel is round)

    ...But I don't know what limitations our gent has... Would that be allowable for him???
    This is exactly why we should stop guessing and wait for EDWARD to come back with some more detailed information
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. Matrix Keypad routine
    By mister_e in forum Code Examples
    Replies: 134
    Last Post: - 18th September 2022, 20:30
  2. PICs can do more if use others than delays instructions
    By hardcore in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th February 2010, 19:52
  3. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

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