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 support@ccsinfo.com

uart don't interrupt

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



Joined: 30 Jul 2009
Posts: 2

View user's profile Send private message

uart don't interrupt
PostPosted: Thu Jul 30, 2009 1:15 pm     Reply with quote

Hi

interrupt doesn't work on circuit. Can you look at the codes and tell me where I'm making wrong?





Code:

#include <18F4620.h>
#FUSES NOWDT,WDT128,H4,NOPROTECT,BROWNOUT,NOPUT,STVREN,NODEBUG,NOLVP,NOWRT,NOWRTB,NOWRTC,NOCPD,NOCPB,NOEBTR,NOEBTRB,CCP2B3
#device ADC=10
#use delay(clock=32Mhz,oscillator=8Mhz)


#use rs232(baud=9600, uart, parity=N, stop=1,bits=8)

#define FAST_GLCD

#include "HDM64GS12.c"
#include <MATH.H>
#include "graphics.c"
 
.
.
.
.
.

#INT_RDA
void SeriVeriAl(void)
{
veri=getc();
alll=true;
}

void main(void) // Ana program
 
{   

clear_interrupt(INT_RDA);
enable_interrupts(INT_RDA);
disable_interrupts(INT_timer0);
enable_interrupts(GLOBAL);
 
setup_adc( ADC_CLOCK_INTERNAL );
setup_adc_ports(  AN0_TO_AN2);

do{


if(alll){sprintf(dene3,"G");glcd_text57(15,8,dene3,1,ON);}
}while(TRUE); 

}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 30, 2009 1:27 pm     Reply with quote

What's the reason for the mux ? Your mux is controlled by a PIC pin.
What's the default state of a PIC pin, upon power-on reset ? Fix that,
or get rid of the mux.
smit



Joined: 30 Jul 2009
Posts: 2

View user's profile Send private message

PostPosted: Thu Jul 30, 2009 2:27 pm     Reply with quote

PIC pin choose one of RS232 modules. PIC pin receives the transmission but doesn't make interrupt.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 30, 2009 2:32 pm     Reply with quote

Where is the line in your posted code that selects the module ?
dyeatman



Joined: 06 Sep 2003
Posts: 1914
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Jul 30, 2009 3:51 pm     Reply with quote

According to the datasheet pin 7 (Enable/Strobe) must be low and I don't see pin 7 connected in the schematic. It looks like the Enable shows as pin 3 in the drawing but pin 3 is also connected as an input so I may be seeing it wrong.
_________________
Google and Forum Search are some of your best tools!!!!
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