(a) The following C program includes at least 10 basic errors, either as:
syntax errors (code the compiler will not understand) or
simple programming/logic errors. (code that will compile, but not work as expected)
The purpose of this program is to produce a Pulse Width Modulated output on a pin, where the ON time is proportional to the 8 bit value read from PORTB. The shortest pulse is produced for an input value 1 and longest pulse for an input value 255.
The program is to loop endlessly turning on (1) PORTC bit 1 at count 0, then turning off (0) PORTC bit 1 when count equals the value read in from PORTB. The counter is to count on to 255 defore the This is shown diagrammatically as an example below.
Copy the program (as written above) into your notebook and circle the location of
each error, write the corrected program beside the original on right-hand side of your
page.
Expert Answer