Author |
Message |
Topic: ds1307 rtc delay 22 Sec/day |
sareehy
Replies: 12
Views: 26532
|
Forum: General CCS C Discussion Posted: Thu Aug 23, 2018 12:34 pm Subject: ds1307 rtc delay 22 Sec/day |
Thank you all for wasting your time with my problem ..
For software rtc you mean this ?
https://www.ccsinfo.com/forum/viewtopic.php?t=26177
Can I use it with any pic ? Can I use the inte ... |
Topic: ds1307 rtc delay 22 Sec/day |
sareehy
Replies: 12
Views: 26532
|
Forum: General CCS C Discussion Posted: Wed Aug 22, 2018 3:36 am Subject: ds1307 rtc delay 22 Sec/day |
thank you
I see another rtc DS3231, could you advise to use it ?
Regards |
Topic: ds1307 rtc delay 22 Sec/day |
sareehy
Replies: 12
Views: 26532
|
Forum: General CCS C Discussion Posted: Wed Aug 22, 2018 1:17 am Subject: ds1307 rtc delay 22 Sec/day |
hi,
I changed the crystal and the delay decreased to (5-6) SEC/DAY.
Is there a software method to correct the drift?
Thank you for your appreciated effort.
regards |
Topic: ds1307 rtc delay 22 Sec/day |
sareehy
Replies: 12
Views: 26532
|
Forum: General CCS C Discussion Posted: Mon Aug 20, 2018 4:48 am Subject: ds1307 rtc delay 22 Sec/day |
hi,
I'm trying to use ds1307.
I'm using pic 16f877a and the following code and library.
https://www.ccsinfo.com/forum/viewtopic.php?t=23255
The problem was after 24 hours i see delay abou ... |
Topic: would be better to connect unused pins or leave them unconne |
sareehy
Replies: 3
Views: 10824
|
Forum: General CCS C Discussion Posted: Tue Aug 22, 2017 9:29 pm Subject: would be better to connect unused pins or leave them unconne |
Thank you for useful information guys
I appreciate your effort ^^
Could the mclr pin connection cause a similar problem ?
and what is the recommended connection for it ?
|
Topic: would be better to connect unused pins or leave them unconne |
sareehy
Replies: 3
Views: 10824
|
Forum: General CCS C Discussion Posted: Sat Aug 19, 2017 3:47 pm Subject: would be better to connect unused pins or leave them unconne |
Hi,
Would be better to use the unused pins of mcu as i/p or o/p ?
or, should leave them unconnected ?
regards |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Sat Aug 19, 2017 12:58 am Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
Exactly.
However it is important how your TRIS is being used. The code here relies on the keyboard bits being set as inputs. They will be provided you don't use a port wide output. You talk about o ... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Fri Aug 18, 2017 4:13 pm Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
You have fiddled with the code without understanding it.
kbd is already defined as a variable to _input_ from the keyboard. That is what the #byte is doing.
In this line:
kbd = input_b()&0x0 ... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Fri Aug 18, 2017 12:41 pm Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
hi,
i modified kbd_getc as the following
char kbd_getc(void)
{
static int1 kbd_down = FALSE;
static char last_key = '\0';
BYTE kchar;
BYTE row;
byte RDio=0;
... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Fri Aug 18, 2017 8:27 am Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
Hi all ^_^
I tried to use pins rb4-rb7 as output.
I modified the kbd_1row as the following:
#if defined use_portb_kbd
#byte kbd = getenv("SFR:PORTB")
#else
#by ... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Mon Aug 14, 2017 3:45 pm Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
Looks good to me, nice clean square edges, which is what you want.
The proof is pressing all the keys and confirm it works in the 'Real World'.
I use external 10K resistors only because some I/O ... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Mon Aug 14, 2017 2:51 pm Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
Thank you guys
I tested the keypad using scope using only pull-up resistors tied to 5V
the signal was as in the following:
http://www.3rbz.com/uploads/thumbs/ba5dcbef255c1.jpg
Wou ... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2017 4:12 am Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
Thank you all for your appreciated effort ^^
No. The posted code has software debouncing. Look at the line
that has a 10 ms delay. That's the software debouncing.
.
Is the 10 m ... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Fri Aug 11, 2017 11:10 pm Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
One thing you have to remember is to call the kbd function often .
Unlike an interrupt driven keyboard routine, this one is 'polled' so that whatever you do in main() has to call it often otherwise t ... |
Topic: Can i modify keypad library kbd.c to work with 1x4 keypad |
sareehy
Replies: 23
Views: 48623
|
Forum: General CCS C Discussion Posted: Fri Aug 11, 2017 11:08 pm Subject: Can i modify keypad library kbd.c to work with 1x4 keypad |
Thanks a lot PCM for your appreciated effort
Is it necessary to hardware debounce the buttons ? |
|