CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

pic18f4685 to a DSPIC33FJ128GP708A Timer 1 Broke [Solved]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
David Pouzar



Joined: 20 Sep 2005
Posts: 27

View user's profile Send private message Visit poster's website

pic18f4685 to a DSPIC33FJ128GP708A Timer 1 Broke [Solved]
PostPosted: Fri Apr 06, 2018 11:55 am     Reply with quote

Hi All: I just moved to DSPIC33FJ128GP708A and can not get my Timer1 to run. I have hooked the 32.768k xtal with two 22pf Caps (same circuit I have used on my PIC18 project) to pin 59 (SOSCI) and pin60 (SOSCO). Have set my FUSES as follows:

#include <33FJ128GP708A.h>
#device ICSP=1
#device ADC=12

//#FUSES FRC //FAST RC OSCILLATOR
#FUSES HS //HIGH SPEED CRYSTAL
#FUSES WDT //Watch Dog Timer
#FUSES WPRES32 //Watch Dog Timer PreScalar 1:32
#FUSES WPOSTS11 //Watch Dog Timer PostScalar 1:1024
#FUSES CKSFSM //Clock Switching is enabled, fail Safe clock monitor is enabled
#FUSES NOJTAG //JTAG disabled
#FUSES NOWDT //NO WATCHDOG TIMER
#FUSES NOPUT //NO POWER UP TIMER
#FUSES ICSP1 //FIRST SET OF PROGRAMMING PINS
#FUSES NODEBUG //NODEBUG WITH ICD
#FUSES NORBS //NO BOOT RAM DEFINED
#FUSES NOSSS //NO SECURE SEGMENT
#FUSES NOWRT //PROGRAM MEMORY NOT WRITE PROTECTED
#FUSES SOSC //SECONDARY OSC


put in my initialization:
setup_timer1(TMR_EXTERNAL|TMR_DIV_BY_1);

Main using
printf(sendlcddata," %04lx",get_timer1());

results are 0000 is always displayed

Ideas?
David Pouzar



Joined: 20 Sep 2005
Posts: 27

View user's profile Send private message Visit poster's website

PostPosted: Fri Apr 06, 2018 12:01 pm     Reply with quote

I need to change my
setup_timer1(TMR_EXTERNAL|TMR_DIV_BY_1);
to
setup_timer1(TMR_EXTERNAL_RTC|TMR_DIV_BY_1);

nice when I can solve my own issue!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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