Page 1 of 1

UART2, UART alternativ et I2C in the same time

Posted: Tue May 17, 2011 8:33 am
by Amandine Randuineau
Dear Mister Kerhuel,
For 4 months, I am working with mister Bateman in the Military Air School of Salon de Provence. I would like create an embedded system to control an UAV.
To do this, I made a program to decode a serial frame from a receiver, one to decode a serial frame from a inertial measure unit and one to control 6 engines with the I2C. One by one, each program is working. When I tried to bring the program together, it was working but the sending frequency of the number 102 in the alternativ UART wasn't the one that I wanted. In fact, to obtain the IMU's informations I have to send to its the letter f (102 in ascii code).
I am working with a dsPIC 30f4013.
I would like to know if you have already seen this problem using the UART 2, the UART alternativ and the I2C in the same time and if you could help me please.
I send you my simulink program.
Yours sincerely.
Amandine Randuineau

Re: UART2, UART alternativ et I2C in the same time

Posted: Thu May 19, 2011 9:43 am
by LubinKerhuel
Hi Amandine,

For the UART problem,
could you try :

- Simulation ==> Configuration parameters ==> Optimisation : Check inline parameters (code will be more efficient)
- UART 1 Config ==> Tx Tab ==> Interrupt configuration : Do not use interrupt (not required here as you sent 1 data every 15ms and the UART baud rate is much higher than this.)
You may also uncheck suppport for inf time, nan value, imaginary number...

Decoding UART should be done only when data are received. Thus for each UART (UART 1 and UART 2) the receive output flag should activate a subsystem which compute the decoding.


Lubin

Re: UART2, UART alternativ et I2C in the same time

Posted: Mon May 30, 2011 7:09 am
by ismaeelbit
Hi Amandine,
I am working also on UAV embedded system and I will like to ask if you are using GPS and how you are able to use the Lubin blockset to acquire the gps data via serial port.

Thanks