Multiplexer address control..


Results 1 to 18 of 18

Threaded View

  1. #12
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Post Re: Multiplexer address control..

    A little more thought reduces it further,no need at all for a shadow working reg at all
    works perfectly on the simulator steps through all 16 "control" states on latb 4-7 and preserves latb 0-3.

    Code:
    ; TODO INSERT CONFIG CODE HERE USING CONFIG BITS GENERATOR
      Processor      18f4550
     
      
      include         "p18f4550.inc"   
    TRUE  equ 1
    FALSE  equ 0
     cblock 0x30 
    control     
    ;latb_shadow   
     endc    
     
     
    RES_VECT  CODE    0x0000            ; processor reset vector
        GOTO    START                   ; go to beginning of program
    ; TODO ADD INTERRUPTS HERE IF USED
    MAIN_PROG CODE                      ; let linker place main program
    START
       
    
     
    
    
    
      MOVLW 0f
      MOVWF control
      MOVLW 3
      MOVWF  LATB,A
    lopo
      BANKSEL control
      INCF control,F
      MOVLW 0xf
      ANDWF control,F
      
      
      MOVF LATB,A,W
      ANDLW 0XF
      SWAPF WREG,F
      IORWF control,W
      SWAPF WREG,F
      MOVWF LATB ,A
     
      GOTO lopo
    Last edited by richard; - 24th July 2018 at 09:02.
    Warning I'm not a teacher

Similar Threads

  1. Replies: 5
    Last Post: - 21st January 2014, 17:10
  2. How do I give a radio control car autonomous control
    By Kenjones1935 in forum General
    Replies: 190
    Last Post: - 17th January 2010, 16:40
  3. Multiplexer channel selection
    By Castor in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 19th May 2008, 11:51
  4. Using a MAX7219 (LED digit multiplexer) with a 16F88
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th March 2007, 22:11

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