Page 1 of 1
Interrupt on incoming RS232 on 18F6622
Posted: Tue Nov 04, 2008 1:39 pm
by WalkOver
Hello everybody !
I try to receive RS232 Strings on a 18F6622. It works well when my program just recept data. But if I add others functions as sending RS232 or PWM etc....It doesn't work. So i try the matrixmultimedia team interrupt code for RS232 incoming but it doesn't work. What I have to do for interrupt for a 18F6622 ?
Thank your for your help !
Re: Interrupt on incoming RS232 on 18F6622
Posted: Tue Nov 04, 2008 5:41 pm
by Benj
Hello
Strange that sending RS232 data doesnt work. Have you tried doing a very basic program that simply sends out data.
This code should work with the custom interrupt enable icon and the 18F6622 chips.
Enable Code
Disable Code
Handler Code
Code: Select all
if (pir1 & (1 << RC1IF))
{
FCM_%n();
clear_bit(pir1, RC1IF);
}
Let me know how you get on.
Re: Interrupt on incoming RS232 on 18F6622
Posted: Tue Nov 04, 2008 6:59 pm
by WalkOver
Thank you Benj,
I tried with a simple program without interruption and nothing else --> it works well.
I can control with a LED if the PIC detect the start octet ( 0xFE ). If I put this program on the custom interrupt enable icon with your code, it doesn't work

The LED stays off.
I want to test with interruption because with other function ( ADC, LCD, RS232 Tx ) but without interruption --> it doesn't work.
I forgot something ?
Thanks again !
Re: Interrupt on incoming RS232 on 18F6622
Posted: Thu Nov 06, 2008 9:27 am
by WalkOver
Hello,
Let me clarify that I don't use the RS232 in the rules. Only one pin is connected between two cards. How to make this work?
CARD NΒ°1 CARD NΒ°2 CARD NΒ°3
TX------------------------RX TX---------------------------RX