Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USART not receiving correct characters

Status
Not open for further replies.
Microchip doesn't want to listen! :mad:

They believe that since it passes a loopback the chip is fine. Even though when connecting 2 pics together via usart A5 to A5 works fine but A5 to A3 does not. This explains why it passes the loopback but geeze.....
 
https://i140.photobucket.com/albums/r29/HakBot/tx_schematic.jpg

The wireless module is the Wi.232-DTS.

The pic is running on 5v, the module 5v but there is an onboard 3.3v reg that goes to the module.

The module is not the problem as I can remove it and place a TTL shifter on the usart lines and display the same thing on the PC terminal. As I understand it a level shifter is only needed on the receiving end. Since I am transmitting a schmitt trigger buffer is not needed.

Receiving is performed by a wi.232USB base station or a TTL shifter that I got from sparkfun. The results are the same from both.

Great looking site Bill!
 
Last edited:
It's a little tough to tell from the schematic but what is R1 for? (on the I assume regulator IC2)
Are you using a wi.232-DTS standalone module 3.3V only or the developers kit?
Note after reading the errata sheets they have changed one bit on the ESUART for rev B5, I'm willing to bet your compiler doesn't support it properly.
**broken link removed**
And thanks for the comment about my site :)
 
IC2 is a 5v reg and r1 is a ptc fuse.

Im using the wi.232DTS eval board (Ive got both the FCC and non FCC versions). It contains header pins and a 3.3v reg for the wi.232. Here is the page: **broken link removed**

Im using mplab v7.5 and c18 v3.02

Edit: After reading that data sheet this really seems like the issue! From the datasheet:

"One bit has been added to the BAUDCON register and one bit has been renamed. The added bit is RXDTP and is in the location, BAUDCON<5>. The renamed bit is the TXCKP bit (BAUDCON<4>), which had been named SCKP. The TXCKP (BAUDCON<4>) and RXDTP (BAUDCON<5>) bits enable the TX and RX signals to be inverted (polarity reversed).

All engineering and production devices of silicon revision B4 or later have the added functionality. The RXDTP bit is not implemented, and the SCKP bit has no effect in Asynchronous mode, on all silicon revision A3 devices."

Thanks a ton for mentioning this bill. I will upgrade tonight and let you know how it goes. Upgrading my compiler was the last thing on my mind.
 
Last edited:
Ok so for the errata. How you fix the errata if it says workaround: none required? I have been looking at the B series however. They dont seem to have an errata for the A5...

I've upgraded to c18 v3.12 and mplab v7.6 and still the same problem.
 
Last edited:
I have been able to get the characters transmitting correctly!!!!!!!! :D

No bugs, chips are good.......I do not understand why but it seems to be related to code. Specifically this:

baudUSART( BAUD_IDLE_CLK_HIGH &
BAUD_8_BIT_RATE &
BAUD_WAKEUP_OFF &
BAUD_AUTO_OFF
);

I removed this line and it worked fine. Both A3 and A5 chips seem to work fine with this line removed. Any ideas on what this line did that caused problems?
 
HakBot said:
I have been able to get the characters transmitting correctly!!!!!!!! :D

No bugs, chips are good.......I do not understand why but it seems to be related to code. Specifically this:

baudUSART( BAUD_IDLE_CLK_HIGH &
BAUD_8_BIT_RATE &
BAUD_WAKEUP_OFF &
BAUD_AUTO_OFF
);

I removed this line and it worked fine. Both A3 and A5 chips seem to work fine with this line removed. Any ideas on what this line did that caused problems?

Check the code it produces?.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top