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 !
Interrupt on incoming RS232 on 18F6622
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Interrupt on incoming RS232 on 18F6622
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
Let me know how you get on.
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
Code: Select all
pie1.RC1IE = 1;
intcon.PEIE = 1;
Code: Select all
pie1.RC1IE = 0;
Code: Select all
if (pir1 & (1 << RC1IF))
{
FCM_%n();
clear_bit(pir1, RC1IF);
}
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Interrupt on incoming RS232 on 18F6622
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 !
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

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 !
- Attachments
-
- interruption RS232.fcf
- (7 KiB) Downloaded 369 times
Re: Interrupt on incoming RS232 on 18F6622
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
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