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

need help with PIC18F6722 ISR setup_timer_0()

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



Joined: 18 Jul 2006
Posts: 33
Location: Maryland, USA

View user's profile Send private message

need help with PIC18F6722 ISR setup_timer_0()
PostPosted: Wed Aug 16, 2006 2:09 pm     Reply with quote

Sorry, about the multiple posts. I disabled HTML in the previous post

I am using Internal Oscillator (INTRC) inside PIC 18F6722 operating at 8MHz. I want LCD_SCP signal (output from PIN F1) to oscillate at 1MHz.

#include <18F6722.h>
#device adc=10
#fuses INTRC, NOWDT, NOPUT, NOPROTECT, BROWNOUT
#use delay(clock=8000000) // Do I need this if I am using INTRC


#int_timer0
void int_timer0_isr()
{
output_high(LCD_SCP);
output_low(LCD_SCP);
}


void main()
{
setup_oscillator(OSC_8MHZ|OSC_INTRC);
set_tris_f(0x00); // Use all pins in Port F for outputs; LCD_SCP is output from PIN_F1
output_low(LCD_SCP);

setup_timer_0(RTCC_INTERNAL|RTCC_DIV_8); // I don't know how does this line of code work
enable_interrupts(int_timer0);
enable_interrupts(global);
}


I am getting a constant low signal @ LCD_SCP (output from PIN_F1). How can LCD_SCP oscillate at 1 MHz clock speed?
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