Page 1 of 1

18F4680 et Wifi RN171 XV

Posted: Fri Apr 24, 2015 4:53 pm
by Philbert Pascal
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

Re: 18F4680 et Wifi RN171 XV

Posted: Mon Apr 27, 2015 2:37 pm
by Benj
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.

Re: 18F4680 et Wifi RN171 XV

Posted: Mon Apr 27, 2015 10:30 pm
by Philbert Pascal
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