|
|
View previous topic :: View next topic |
Author |
Message |
rudy
Joined: 27 Apr 2008 Posts: 167
|
PIC18F2550 CLOCK SETUP |
Posted: Wed Sep 29, 2021 10:36 am |
|
|
Hi.
I am developing a I2C communication between PIC18F2550 and PIC 16F628. Both circuits start with a full 7 segments lit, to test all the 7 segments displays, segments A-G and DP on. Them I wait a delay of 5000ms, and start with all displays with 0 value. This initial 5000 ms delay works very well on the PIC16F628, but not in PIC18F2550, in this last processor, the delay is much bigger than 5000 ms. I wonder if the FUSES is correctly configured, to use an 8Mhz internal clock.
Code: |
#include <16f628A.h>
#fuses INTRC_IO, NOWDT, NOPROTECT, NOBROWNOUT, NOMCLR, NOCPD, PUT, NOLVP
#use delay(clock=4000000, RESTART_WDT)
#use I2C(SLAVE, SCL=PIN_B2, SDA=PIN_B1, ADDRESS=0x20)
|
Code: |
#include <18F2550.h>
#fuses INTRC_IO, NOWDT, NOPROTECT, NOLVP, NODEBUG, VREGEN, PUT, FCMEN
#use delay(internal=8MHz)
#use I2C(MASTER, SDA=PIN_B0, SCL=PIN_B1)
|
Regards; |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Thu Sep 30, 2021 1:58 am |
|
|
Yes, this is a lovely little 'oddity', where the data sheet is wrong, and
the CCS default setup, follows the data sheet.... Eeek!...
It was brilliant work by PCM back in that older thread that actually
narrowed down what was happening.
However as outlined in that thread, using this PIC with the internal RC
is a very unusual way to work, since you are then paying for a USB
PIC that can't then do USB... |
|
|
rudy
Joined: 27 Apr 2008 Posts: 167
|
|
Posted: Thu Sep 30, 2021 6:45 am |
|
|
KKKKKK;
This PIC clock is really trick! It is not the first time that I suffer!
Thank you! |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|