UART write error

Please check the frequently asked questions before posting to the forum.
Post Reply
Author
Message
jrmi
Posts: 27
Joined: 21 Jan 2010 09:10

UART write error

#1 Post by jrmi » 31 Jan 2012 07:01

I have dsPIC compiler, I have written code to send some data for print device,
the the data get from DSP is not,
I have tray different way to solve it but I could not,
And I think the read will be same

This is some of the data the DSP has send it

8E-00-00-00-00-00-00-00

while the DSP should send
0x4D-0x58-0x10-0x01-0x60-0x16

The file is attached

Thanks
Attachments
UART Print.rar
(54.1 KiB) Downloaded 251 times
[color=#0080FF]Thanks,

jrmi[/color]

jrmi
Posts: 27
Joined: 21 Jan 2010 09:10

Re: UART write error

#2 Post by jrmi » 01 Feb 2012 15:20

I am still waiting the response .....
[color=#0080FF]Thanks,

jrmi[/color]

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

Re: UART write error

#3 Post by jpc » 01 Feb 2012 15:50

this is a rather dark corner of the forum, old compiler for PIC and also Pascal where you ask something for dsPIC in C, anyway you start filling pdata[] with the 'expected' data and next send cmd[] data.
I see many lines of this code commented out, please do yourself and the forum a favour and clean before posting, that will help getting usefull answers.
Au royaume des aveugles, les borgnes sont rois.

jrmi
Posts: 27
Joined: 21 Jan 2010 09:10

Re: UART write error

#4 Post by jrmi » 02 Feb 2012 06:58

Hi

I have tray to make it easy, Here the code I tray to make it clean
I appreciation all advice

Regads
Attachments
UART Print.rar
(6.08 KiB) Downloaded 239 times
[color=#0080FF]Thanks,

jrmi[/color]

jrmi
Posts: 27
Joined: 21 Jan 2010 09:10

Re: UART write error

#5 Post by jrmi » 07 Feb 2012 08:07

Hi

I wash you discover how to solve it.

Thanks
[color=#0080FF]Thanks,

jrmi[/color]

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

Re: UART write error

#6 Post by jpc » 07 Feb 2012 08:41

besides the fact that you are still posting here in an old Pascal forum instead of the more appropriate C section, are you sure the reply on your version request arrives fast enough? what LCD-messages do you get when you try to run this ? I see no delay at all between sending the request and evaluating the reply, maybe it needs some delay there.
Au royaume des aveugles, les borgnes sont rois.

jrmi
Posts: 27
Joined: 21 Jan 2010 09:10

Re: UART write error

#7 Post by jrmi » 07 Feb 2012 12:38

Thanks

I will posit it at C

Thanks,
[color=#0080FF]Thanks,

jrmi[/color]

Post Reply

Return to “mikroPascal FAQ”