Use of switch case in ccs c compiler with PIC16F877A

Status
Not open for further replies.

john120

Banned
Joined
Aug 13, 2011
Messages
257
Helped
11
Reputation
22
Reaction score
10
Trophy points
1,298
Activity points
0
hello,can you plz help me to use switch case in ccs c compiler,I want count period of different frequencies and then take decision basing on that.
For simplicity I only considered the period of those frequencies;for example the codes will take decisions as follows:

in case period is between 0 and 3 the lcd will print "WELCOME"

in case period is between 4.5 and 5 : the lcd prints "TO"

in case period is between 5 and 5.5 the lcd will print "PIC"

in case period is between 5.5and 6 : the lcd prints "PROGRAMMING"
in case period is between 6and 10 the lcd will print "IN "

in case period is between 3 and 4.5 : the lcd prints "ENG. GROUP"

the lcd displays one f those messages after pressing on a push button.

Thnaks.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…