LCD Data on portA and portB


Closed Thread
Results 1 to 32 of 32

Hybrid View

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



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

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



  4. #4
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default lcd data on port a and portb

    yo thanks for the help guys. modifing the hardware is not an option because i am planning on upgrading a whole bunch of these boards with new code (1000+ boards)

    dwayne- i think your on the right track as to what i need. i think that i should be able either:

    2. to use four 1 byte variables (one byte for each data line on lcd) and output serially each byte at the same time

    or

    1. pick what bit holder in a byte to output on a specifed port.



    i drew a picture of what my idea is. the main question is how the data should be strucuted. the data a drew is not exact its just to give you an idea of the structure.

    remember that there is a 256byte eeprom on the board as well. this is only additional memory correct? my pic has built in memory. my best guess is that the eeprom was added to the design to hold the LCD data.
    Attached Images Attached Images  

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    My suggestion, use LCD.BAS from Melabs. It's made to work with PBC and you can modify it for your special need
    download it here
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    well, i should read carefully the first post... i'll agree with the Ralph's suggestion. But for a thousand board... could be interesting to make a DIP adapter that change the OLD PIC pin to the new PIC pin configuration.

    Well just an idea.
    Last edited by mister_e; - 5th May 2005 at 04:25.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    uuq1's Avatar
    uuq1 Guest


    Did you find this post helpful? Yes | No

    Lightbulb

    Below is the code I had developed to write data to LCD without using the LCDout command.
    thought may be of help:

    '************************************************* ***************
    '* Name : LCD 8Bit.BAS *
    '* Author : uuq1 *
    '* Notice : Copyright (c) 2005 [set under view...options] *
    '* : All Rights Reserved *
    '* Date : 4/25/2005 *
    '* Version : 1.0 *
    '* Notes : *
    '* : *
    '************************************************* ***************
    'VARIABLES DECLARATION
    CHARCNT VAR BYTE
    CHAR1 VAR BYTE
    TOTAL CON 20 ' A CONSTANT FOR NO OF CHARS ON ONE LINE OF LCD

    'Pin Assignments
    LCD_RS VAR PORTA.0
    LCD_EN VAR PORTA.1

    Start:
    Pause 150
    TRISA=2
    TRISB=0
    PORTA=0
    PORTB=0

    PORTB=%00110000 ' FUNCTION 8 BITS, LCD INITILIZATION REQUIRE THIS COMMAND TO BE SENT 3 TIMES.
    GOSUB LCDINS
    PORTB=%00110000 ' FUNCTION 8 BITS
    GOSUB LCDINS
    PORTB=%00110000 ' FUNCTION 8 BITS
    GOSUB LCDINS
    PORTB=%00111000 ' fUNCTION 8 BITS, 2 LINES, FONT #1
    GOSUB LCDINS
    PORTB=%00001100 ' DISPLAY ON, CURSOR OFF, BLINK OFF
    GOSUB LCDINS
    PORTB=%00000001 ' CLEAR THE DISPLAY
    GOSUB LCDINS
    PORTB=%00000110 ' CLEAR THE DISPLAY
    GOSUB LCDINS
    CHARCNT=0

    PRINC:
    IF CHARCNT <= TOTAL THEN
    CHAR1="A"
    ELSE
    CHAR1="B"
    ENDIF

    IF CHARCNT=TOTAL+1 THEN
    PORTB=$C0 'GOTO 2ND LINE FIRST POSITION
    GOSUB LCDINS
    ENDIF

    IF CHARCNT >= (TOTAL * 2)+1 THEN
    PORTB=1 'CLEAR THE DISPLAY
    GOSUB LCDINS
    PORTB=$80 'GOTO 1ST LINE FIRST POSITION
    GOSUB LCDINS
    CHARCNT=0
    ENDIF

    'PRINT THE CHAR ON LCD
    PORTB=CHAR1
    GOSUB LCDDATA
    PAUSE 100

    'INCREMENT THE CHARCNT
    CHARCNT=CHARCNT + 1
    GOTO PRINC

    LCDDATA:
    PAUSEUS 25
    HIGH LCD_RS
    PAUSEUS 25
    HIGH LCD_EN
    PAUSEUS 25
    LOW LCD_EN
    RETURN

    LCDINS:
    PAUSEUS 25
    LOW LCD_RS
    PAUSEUS 25
    HIGH LCD_EN
    PAUSEUS 25
    LOW LCD_EN
    RETURN

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 : 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