UART2, UART alternativ et I2C in the same time

Post Reply
Amandine Randuineau
Posts: 1
Joined: Tue May 17, 2011 7:49 am

UART2, UART alternativ et I2C in the same time

Post by Amandine Randuineau » Tue May 17, 2011 8:33 am

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
(140.06 KiB) Downloaded 216 times

Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France

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

Post by LubinKerhuel » Thu May 19, 2011 9:43 am

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.


Posts: 19
Joined: Mon Feb 28, 2011 5:00 am

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

Post by ismaeelbit » Mon May 30, 2011 7:09 am

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.


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest