Question
Consider that a PIC18 is with a frequency of 8MHz (a) Find the time delay for the subroutine shown below (no need to compute
Consider that a PIC18 is with a frequency of 8MHz (a) Find the time delay for the subroutine shown below (no need to compute the overhead). Show your steps. (4 marks) Delay: HERE Delay: AGAIN (c) MOVLW MOVWE REGB NOP NOP NOP NOP NOP NOP NOP DECF BNZ REUTURN 2 MOVLW Ox?? MOVWE TOCON MOVLW 0x?? MOVWE TMROH MOVLW Ox?? MOVWF TMROL ??????? ??????? ??????? RETURN MOVLW MOVWF Consider the following subroutine that uses Time0 for generating 10 ms delay. Complete code BCF INTCON, TMROIF BSF TOCON, TMROON NOP DECF BNZ RETURN d'100' PORTS RDO PIC18 Sender (7 marks) Suppose the PIC18 sender use Simple Strobe for handshaking, where PORTD is for data output and RB0 is used for STB signal. STB PORTO Machine Cycle Data Instruction 1 1 1 I REGB, FI HERE 2 1 1 1 1 DATA Line DO-07 Receiver (i) Write a PIC18 subroutine for the PIC18 sender to send out a byte from WREG. Assume that the STB signal should be hold for 4 MC. Also, write several lines of code to initialize the PORTD. C) What are disadvantages of using Simple Strobe for IO. STB DATA MC 1 1 1 1 2 (branch) 1 (falling through) 2 (9 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started