Page 1 of 1

Consider the following microcontroller 8-bit peripheral register. Bit 7 6 5 4 3 2 1 Purpose start ready channel gain (a)

Posted: Thu May 05, 2022 1:17 pm
by answerhappygod
Consider The Following Microcontroller 8 Bit Peripheral Register Bit 7 6 5 4 3 2 1 Purpose Start Ready Channel Gain A 1
Consider The Following Microcontroller 8 Bit Peripheral Register Bit 7 6 5 4 3 2 1 Purpose Start Ready Channel Gain A 1 (17.31 KiB) Viewed 36 times
Consider the following microcontroller 8-bit peripheral register. Bit 7 6 5 4 3 2 1 Purpose start ready channel gain (a) Create a single data structure in C that allows this register to be viewed as both: (i) An unsigned char. (3 marks) (ii) A set of bit fields. (4 marks) (b) Show the code to implement the following sequence as C language code: (i) Set register to zero. (1 mark) (ii) Set channel to 4 and gain to 1. (1 mark) (iii) Set start bit to 1. (1 mark) (iv) Wait until ready bit is a 1. (1 mark) (v) Set start bit to 0 (1 mark)