Saturday, May 19, 2012

Prototype based on MSP430 : Design Issues

Level conversion is just not enough always for a proper UART communication between two devices working at different standard voltages , normally 3.3V and 5V.

This issue crops up when we try to interface a sensor working at 5V [which generally is the case], to a controller or processor working at 3.3V. In our case , we were using the GSM modem which gives a 5V serial UART output and MSP430 powered at 3.3V.

We understood that we need a MAX232 for proper protocol conversion. Without MAX232 we were getting some deterministic values but not correct ones . The reason i feel is that the logic levels are set as -5V and 5V for uart communication , but as we have matched the ground , there may be problems with required voltage levels not getting matched.

A tip : A debug method i use to check whether the rx lines are connected properly. If you ground the rx pin and pull it out , it must give you an ascii character something like  "???" . That's pretty interesting , we done guys ascii codes + uart combined is intelligent enough to tell us "What the F are you doing ??". So if you are getting values like this probably you have loosely connected to gnd  :p.

Believe me its fun to debug this way if your rx wire is crossing 2-3 boards to reach the destination. 

No comments:

Post a Comment