1. For the following code segment, predict what you will see occur once power is applied,
and explain your reasoning.
int main() {
...normal config, including uart...
outString(“Howdy Y’all!\n”);
_SWDTEN = 1;
asm(“pwrsav #0”);
while(1);
}
The following problems assume external LEDs (LED1, LED2, and so on) and switches (SW1, SW2, and so on). When writing code for these problems, define macros for them as done in using the predefined macros inlib\include\pic24_ports.h. You may use any of the RBn ports you want to implement these problems. Assume switch inputs are pushbutton inputs, and use the internal weak pull-up of the port.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here