Download Lecture Notes

Transcript
40
Notes:
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
The idea of the program is to determine the time interval between each Athan and Iqama. Each
switch is used to determine the interval of a specific Athan. The time appeared on the two 7segment.
In low level language, the counter is a memory location. But in high level language to make a
counter we just need to declare variable.
Port A was set to be output. B0 o B3 output and B4 o B7 were adjusted to be input.
The line command if ((PORTB & 0b00010000)==0b0) i=10; is used to determine the time or the
count of each switch to represent the interval of a specific Athan.
The code inside the while is used to send the LSB and MSB on PORTA, PORTB respectively.
In Micro C code, Retfie is not important to be written.
B
B
40