cmaelot24
Newbie level 2
Hello All,
I'm using dsPIC33FJ32GP204. I'm kind of newbie and sorry for the easy mistakes first of all.I 'm trying to do my research.
I wrote a code that in CCS C works well for PIC16F877 using i2c that communicates with eeproms and lcd. But when I copy paste it to the dsPIC33f ( changig with device id) when i use proteus and when I set the dsPIC clock property to 20Mhz same with the delay in code,proteus gives me "Start hold time violated.Start was at bla bla bla" Stop setup time violated. Last change on SDA was at bla bla bla". In short, when I set both delay and mcu's clock setting the same not in just 20Mhz case, I get the error. I kind of solved this issue setting mcu's clock freq. to 8Mhz while delay is 20Mhz in code but I don't accept this as a solution. Please help me. And I really don't know whethere my clock config or simulator is the problem. That's make me crazy.
I want to use a crystal.And I want system clock speed to be 20Mhz.
My #fuses are like this:
MPLAB X IDE v5.2
CCS C Compiler as a plugin 3.1
I'm using dsPIC33FJ32GP204. I'm kind of newbie and sorry for the easy mistakes first of all.I 'm trying to do my research.
I wrote a code that in CCS C works well for PIC16F877 using i2c that communicates with eeproms and lcd. But when I copy paste it to the dsPIC33f ( changig with device id) when i use proteus and when I set the dsPIC clock property to 20Mhz same with the delay in code,proteus gives me "Start hold time violated.Start was at bla bla bla" Stop setup time violated. Last change on SDA was at bla bla bla". In short, when I set both delay and mcu's clock setting the same not in just 20Mhz case, I get the error. I kind of solved this issue setting mcu's clock freq. to 8Mhz while delay is 20Mhz in code but I don't accept this as a solution. Please help me. And I really don't know whethere my clock config or simulator is the problem. That's make me crazy.
I want to use a crystal.And I want system clock speed to be 20Mhz.
My #fuses are like this:
Code C - [expand] 1 2 3 4 5 6 7 #include <./33FJ32GP204.h> #include <stdlib.h> #fuses HS,PR #fuses NOALTI2C1 #fuses NODEBUG,NOPUT,NOPROTECT,NOWRT,NOWDT #use delay(crystal=20000000)
MPLAB X IDE v5.2
CCS C Compiler as a plugin 3.1