Hi Ben,
here I have finished my Flowcode program. I use a pic 18F4680. I transmits data on RC6 / RC6 (RX / TX) from a wireless unit RN171XV of Microchip. For the test in Flowcode I use RS232 .All works great. By cons when I use the peak with the program, nothing that happens when I send them given the Wifi module. Before compiling, should I change something in the code Flowcode ?. I use a display for the test, I think that I have to disable for the final compilation.
I need some help.
Thank you in advance and good weekend to all
pascal
Bonjour Benj,
voila j'ai terminé mon programme Flowcode. J'utilise un pic 18F4680. Je transmet des données sur RC7/RC6 (RX/TX) venant d'un module wifi RN171XV de chez Microchip. Pour les test dans Flowcode j'utilise RS232 .Tout fonctionne à merveille. Par contre dès que j'utilise le pic avec le programme, rien ne ce passe quand j'envoie les donnés avec le module Wifi. Avant la compilation, dois-je changer quelque chose dans le code Flowcode?. J'utilise un afficheur pour les tests, je pense qu'il faut que je le désactive pour la compilation finale.
J'ai besoin d'aide.
Merci d'avance et bon weekend à tous
pascal
18F4680 et Wifi RN171 XV
Moderator: Benj
-
- Posts: 80
- Joined: Fri Jul 20, 2012 8:55 am
- Location: Chambly (France)
- Been thanked: 4 times
- Contact:
18F4680 et Wifi RN171 XV
- Attachments
-
- Code_Escalier_PIC18F4680_V5.1.4.xMarches_Wifi.fcfx
- (819.54 KiB) Downloaded 293 times
-
- Wifi et pic 18F4680.png
- (333.95 KiB) Downloaded 2687 times
- 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: 18F4680 et Wifi RN171 XV
Hi Pascal,
I've looked through your program and it looks very good, the config settings all seem correct and there seems to be various LED based debug code going on. Are the LEDs coming on correctly on the hardware and are the timings ok?
One thing I could suggest is to remove the RS232 init macro call from the Init_Lire function and place it before your 5s delay in main. The WIFI module UART could be locking up if the uC TX pin is floating for a long period after power up. Moving the init to the start of the program should allow the TX pin to be outputting a high signal immediately after power up.
I've looked through your program and it looks very good, the config settings all seem correct and there seems to be various LED based debug code going on. Are the LEDs coming on correctly on the hardware and are the timings ok?
One thing I could suggest is to remove the RS232 init macro call from the Init_Lire function and place it before your 5s delay in main. The WIFI module UART could be locking up if the uC TX pin is floating for a long period after power up. Moving the init to the start of the program should allow the TX pin to be outputting a high signal immediately after power up.
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
-
- Posts: 80
- Joined: Fri Jul 20, 2012 8:55 am
- Location: Chambly (France)
- Been thanked: 4 times
- Contact:
Re: 18F4680 et Wifi RN171 XV
Good evening Benj,
I put the initialization of the RS232 early in the program. It works two or three times and after ca unresponsive. As if the communication port was planted. Would not like it you better create an interrupt to read the Rx / Tx. Can you change my program I sent you. I did some tests with an interrupt, but I was not getting any data. Trying to change my program that I test. Look at my previous email, I explain to the test interuption.
Thank you in advance and good day.
Cordially
Pascal
Bonsoir Benj,
j'ai mis l'initialisation de la RS232 en début de programme. Ca fonctionne deux ou trois fois et apres ca ne répond plus. Comme si le port communication était planté. Ne voudrais t'il pas mieux de créer une interuption pour lire le Rx/Tx. Peux tu me modifier le programme que je t'ai transmis. J'avais fait des tests avec une interuption, mais je ne recevais aucune donnée. Essai de modifier mon programme pour que je test. Regarde mon précedent mail, j'explique pour le test en interuption.
Merci d'avance et bonne journée.
Cordialement
Pascal
I put the initialization of the RS232 early in the program. It works two or three times and after ca unresponsive. As if the communication port was planted. Would not like it you better create an interrupt to read the Rx / Tx. Can you change my program I sent you. I did some tests with an interrupt, but I was not getting any data. Trying to change my program that I test. Look at my previous email, I explain to the test interuption.
Thank you in advance and good day.
Cordially
Pascal
Bonsoir Benj,
j'ai mis l'initialisation de la RS232 en début de programme. Ca fonctionne deux ou trois fois et apres ca ne répond plus. Comme si le port communication était planté. Ne voudrais t'il pas mieux de créer une interuption pour lire le Rx/Tx. Peux tu me modifier le programme que je t'ai transmis. J'avais fait des tests avec une interuption, mais je ne recevais aucune donnée. Essai de modifier mon programme pour que je test. Regarde mon précedent mail, j'explique pour le test en interuption.
Merci d'avance et bonne journée.
Cordialement
Pascal
- Attachments
-
- Bug programme interuption.docx
- (410.78 KiB) Downloaded 286 times