UART232 Configuration Problem

Create new topics, add your comment, remark, bugs...
Post Reply
onuruygur
Posts: 11
Joined: Tue Feb 02, 2010 4:24 pm

UART232 Configuration Problem

Post by onuruygur » Mon Feb 08, 2010 7:22 pm

Hi all,

I have FLEX Lite board and i have prepared the model given at the attachment. It is a very basic model which blinks the led and sends "A" to serial port.

Here is the problem: Led blinks but UART 1 doesn't send "A" to hyper terminal...

I suprisely discovered that it transmits when ICD2 is in programming progress (all the "A"'s on the hyper terminal are received during the programming proccess from the board when I change the code character is changing). So i think that it is not hardware related. May be a configuration error?

Anybody have idea? Or Anybody who can share me FLEX Board related master configuration? :roll:

Regards,
Attachments
Model and hyperterminal ss
Model and hyperterminal ss

Bobes
Posts: 36
Joined: Wed Nov 25, 2009 11:27 am
Location: Brno, CZE
Contact:

Re: UART232 Configuration Problem

Post by Bobes » Tue Feb 09, 2010 2:46 am

Hello, can you be more specific about the connection? Is the UART connected via USB? or ie via MAX3232 and Rx Tx pins?
I am not really an expert, but I would think it is more likely wiring problem. UART should not be sending anything during programming.
If you are using UART Rx and Tx, there should not be any signal done by the ICD, as it is connected to one of the PGED/PGEC pairs, and those are not re-mappable with UART. I am not sure how is it with USB, but as you are using UART peripheral it should be still somehow wired.
Try re-checking the wiring connection. Hope this helps. Good luck.
Josef

onuruygur
Posts: 11
Joined: Tue Feb 02, 2010 4:24 pm

Re: UART232 Configuration Problem

Post by onuruygur » Tue Feb 09, 2010 9:04 am

Hello Josef,

Thank you for your reply.

Yes, I am using MAX3232 for interfacing UART1 and UART2 for my FLEX board. After your reply, with the given model below I have seperated the prototype board (so there is no max3232) and have a check with a digital oscilloscope on UART 1 TX and UART2 TX (directly at the dspic pins) but there is no meaningful signal out on these pins. :?

Led blinks but something is wrong with UART....

Bobes
Posts: 36
Joined: Wed Nov 25, 2009 11:27 am
Location: Brno, CZE
Contact:

Re: UART232 Configuration Problem

Post by Bobes » Tue Feb 09, 2010 3:56 pm

OK.. i think I may see the problem: have you mapped the peripheral properly? (PIN mapping block?)
please attach the mdl file

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

Re: UART232 Configuration Problem

Post by LubinKerhuel » Thu Feb 11, 2010 5:22 pm

Hello,

I got another explanation :

UART block is pink : that mean that block has a sampling time of inf : this block is executed only once at model start.

Solution : sampling time of the UART block (different from UART speed) is inherited from the constant block. Thus,
* open the constant block
* set its sampling time to someghint like .01 (or the sampling time of your model).

it should works properly
(I think there is no the mapping option on the microchip dspic used on the flex lite board)

Lubin

onuruygur
Posts: 11
Joined: Tue Feb 02, 2010 4:24 pm

Re: UART232 Configuration Problem

Post by onuruygur » Sun Feb 21, 2010 5:53 pm

Hi and thank you for all,

Yes Lubin you were right (not suprise) :) ...

And yes mapping is not an option for FLEX boards.

On my works, what i see is; i am not able to use standart xpc target s-functions such as "FIFO HDRS Read" or basic "ASCII Decode" with DSPIC target. I was using these functions for decoding any sensor on RS232 with xpctarget pc's. I could'nt find a FIFO which converts discrete bytes (as "1", "2"...) to vectors (as "123") received from UART RX block.

What do you advice me for reading a RS232 packet like "A 123 456 789 910 123 456 789 Z" (I am not able to use C Call yet...)

At the end i need:
DATA1= 123
DATA2= 456
DATA3= 789...

Best regards,

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 49 guests