decoding PIC assembly -- need help


Closed Thread
Results 1 to 2 of 2
  1. #1
    uchiprox's Avatar
    uchiprox Guest

    Default decoding PIC assembly -- need help

    is there any chance somebody could help me figure out what this code does:

    Code:
    list p=18f458, f=inhx32
    #include <p18f458.inc>
    
    BankRam equ 'H20'
    cblock BankRAM
         COUNT
         DVAR
         DVAR2
    endc
    
    org 00h
    goto start
    
    org 1C h 
    Start
         movlw   0
         movwf   PORTB,0
         movwf   TRISB,0
    
    IncCount
         incf        COUNT,1,0
         movf      COUNT,0,0
         movwf           PORTB,0
         call         Delay
         goto        IncCount
    
    Delay 
          movlw   00FF
          movwf   DVAR2
    
    D0
         movwf    DVAR
    
    D1 
          decfsz     DVAR,1
          goto     D1
          decfsz     DVAR2,1
          goto     D0
          return
    end
    Many thanks!,
    uChipRox

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


    Did you find this post helpful? Yes | No

    Default

    is there any chance somebody could help me figure out what this code does:
    Your guess is as good as mine. But...

    In PicBasic Pro it would look like ....
    Code:
    COUNT  VAR BYTE
    
    PORTB = 0
    TRISB = 0
    
    IncCount:
        COUNT = COUNT + 1
        PORTB = COUNT
        PAUSE  65 
    GOTO IncCount
    Assuming a 4mhz OSC.

    @ 20mhz it would be PAUSE 13.
    <br>
    DT

Similar Threads

  1. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  2. assembly in Pic
    By lerameur in forum Off Topic
    Replies: 11
    Last Post: - 1st May 2008, 20:06
  3. Simultaneous equation using PIC assembly
    By mankan in forum General
    Replies: 2
    Last Post: - 11th September 2006, 19:16
  4. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  5. SMS decoding / encoding using PIC!
    By bitmaniac in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 19th March 2004, 07:03

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