Splitting a byte?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Deadeye's Avatar
    Deadeye Guest

    Question Splitting a byte?

    OK im writing to a LCD using 8 bit mode.
    It is a graphic LCD module.

    anyway im using 6 outputs on PORTA and 2 on PORTB

    HOW DO I DO THAT?

    I was hopeing that this would work

    PORTA = glcd_dat
    PORTB.6 = PORTA.4
    PORTB.5 = PORTA.5

    but it doesnt.

    please help

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


    Did you find this post helpful? Yes | No

    Default

    what about your whole code? I hope you know that LCDOUT will not work for your Graphic LCD!!!
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    Maybe you wanted something more like this...

    PORTA = glcd_dat
    PORTB.6 = glcd_dat.6
    PORTB.5 = glcd_dat.7

    Bit's 0-5 will go to PORTA. Bit's 6 and 7 will be ignored. Then 6 and 7 are copied to PORTB.

    Darrel

  4. #4
    Deadeye's Avatar
    Deadeye Guest


    Did you find this post helpful? Yes | No

    Default woohoo

    thanks a bundle that worked.


    Yes i know LCDOUT wont work. LOL. Thats why it took me 2 weeks to get this dam thing working.

Similar Threads

  1. LCD freeze
    By harryweb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th October 2009, 08:01
  2. Memory use - how much do you use?
    By keymuu in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 10th June 2009, 22:39
  3. byte compression
    By Norbert in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 16th June 2007, 18:04
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. 16F877 RAM Question
    By Art in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 6th August 2005, 11:47

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