Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Time controlled switch using PIC18F4550 with MPLAB

Status
Not open for further replies.

aniketkarajgikar

Newbie level 1
Joined
Mar 26, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
9
I am taking input of start time of any device from keypad and comparing it with current time of RTC. When current time matches RTC, LED will be ON.
I am using following logic.

consider inputs of minutes from keypad as mindecimal and minunit.
mindecimal=readkey();//to read key from keypad
minunit=readkey();//to read key from keypad

and RTC's minute will be
min=get_time(1);// function to read minutes from RTC

Now for comparing,

x=((min&0x70)>>4);
y=mindecimal - 0x30;

p=(min&0x0F);
q=minunit - 0x30;

if(x==y)
{
if(p==q)
{
//glow LED
}
}

But logic not working correctly.
Please Help.
I also want to do it for stop time.
Please Help.
Using MPLAB with xc8 compiler, pic18f4550 with ds1307 i2c bus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top