Question: The microcontroller has to read an external signal, that uses port pins RA 1 and RAO. RAO is used as a clock, and it is
The microcontroller has to read an external signal, that uses port pins RA and RAO. RAO is used as a clock, and it is driven by an approximately kHz clock signal. The RA input is used as serial data input, where the data bits can be sampled on the rising edge to transition of the clock signal. The serial input data consists of bit unsigned numbers, and the most significant bit comes first. Write a subroutine INIT PORT that sets the used port pins RAORARBO,RB to the appropriate mode input or output The subroutine must not change any other port pin. Write the assembly subroutine READDATA that: First sets port pins RBO and RB to then waits for an incoming data on RAO and RA and after the bit value arrives, sets RBO and RB according to the incoming value: RBO,RB if value RBO, RB if value RBO, RB if value
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
