Ask Your Computer Question. Computer Experts Answer You ASAP.

(Not a Computer Question?)

Programming Peripheral Interrupt Controllers
Sent to Computer Experts February 22 03:13 PM

In the following questions, please use any user memory address you wish, providing it is within actual real memory and does not affect any special function registers, unless otherwise specified. Initialise all files/registers as necessary.

Q1) Write a program which takes data in from portB (06h), only when bit 0 on portA (05h,0) is high and store the data in some address. The program should indicate, by making output portA,1 high, that the data has been received and not take any new data in from portB until a low (logic 0) has been detected on portA,0. the program should be capable of taking 10 bytes of data in and store this data at sequential addresses.

Q2) write a program to manually complete a 2s complement subtraction, testing for negative numbers and place the result

Can you provide what each piece of code is doing.

 

Optional Information:
OS: Windows Me; Browser: Other

Already Tried:
VARIOUS BOOKS!!!

Customer (name blocked for privacy)
Reply
February 25 3:29 PM (3 days later)
         
Relist: No answer yet.
please help
or refund of money
Reply
February 26 5:14 PM (1 day and 1 hour later)
         
Relist: I still need help.
Answer
February 26 7:42 PM (2 hours and 28 minutes and 19 seconds later)
         
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
Reply
February 27 4:10 AM (8 hours and 27 minutes and 50 seconds later)
         
steven
this does not look like the code we use

here is an example of a question i answered using the code

Code written to add literal 03h to 05h and put result on to output portB


0x004        ;interrupt vector location
clrf 06h       ;Set all of portb to a logic 0
bsf 03h,5     ;go to page 1 of pic
clrf 06h;      ;clear portb and set portb to be an output.
bcf 03h,5     ;go to page 0 of pic
movlw 03h   ;move literal 03h to the W register
addlw 05h    ;Add 05h literal to the value which has already
                     ;been moved to the W reg which is 03h
movwf 06h    move the answer to the addition completed above
                      (03h+05h) to portb
End                 end program
Think you can answer this question?
Login or Become an Expert

 

DISCLAIMER: You acknowledge that any information you may obtain from individuals you contact through use of the Just Answer service comes from those individuals, not from Just Answer!, and that Just Answer is not in any way responsible for any of the information these third parties may supply. The site and services are provided "as is" with no warranty and no representations are made regarding the qualification of an Expert. Responses and comments on Just Answer! are for general information and are not intended to substitute for informed professional advice (such as medical, legal, investment or accounting) and do not establish a professional-client relationship. Just Answer! is not intended or designed to address EMERGENCY QUESTIONS which should be directed immediately by telephone or in-person to qualified professionals. Please carefully read the Terms of Service.

Just Answer! > Computer and Software Help