Author Topic: UART receive problem  (Read 4231 times)

0 Members and 1 Guest are viewing this topic.

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
UART receive problem
« on: April 04, 2008, 10:03:16 AM »
I'm connecting a dsPIC30F microcontroller to a GHI Electronics uALFAT-tf board (writes to a micro sdcard in FAT format).  The dsPIC runs off 5V and the uALFAT runs off 3.3V but the inputs are 5V tolerant.  So far I've had no problems transmitting via UART from the dsPIC to the uALFAT, but for some reason I'm having problems going the other direction.  When the uALFAT writes to the dsPIC, the dsPICs buffer shows that it's loaded, but when I try to read from the buffer I usually on get the "h" character (sometimes a "g" or "i" or "e" but mostly "h").  *Note: These are the first characters that automatically come from the uALFAT when it's turned on, spelling out "ghi electronics......etc."*
I'm trying to get the onboard clock time from the uALFAT so I should be getting numbers.  It seems like the "h" character gets stuck in the buffer, but if that's the case, why does the 'character ready' register go high?  I might be totally wrong, but the only lead I have now is that the dsPIC register is having problems with the 0-3.3V logic levels, but I don't know why it should.  I haven't been able to test this theory cause I can't find a simple way to bump the 3.3V to 5V.  I tried a PNP 2907, but the delay was so long that it just mushed the signal.

I'm really desperate.  I should have had this project done last week.  Any help is appreciated.

-Jason
« Last Edit: April 04, 2008, 10:05:30 AM by jsmoker »

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
Re: UART receive problem
« Reply #1 on: April 05, 2008, 01:08:07 PM »
Just incase others have the same problem, I got a bite on another forum about non-inverting buffers suggesting 74HCT series chips.  I'm going with something slightly different(MC74VHC1GT125 ), cause Digikey doesn't have anything in the 74HCT in a small enough package.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: UART receive problem
« Reply #2 on: April 07, 2008, 05:53:11 PM »
Hmmmm try a lower baud rate, perhaps the error rate is too high and it messes up after only a character or two.

If you are really worried about voltage, use an op-amp to boost the signal to 5V.

Hook the uALFAT tx to an oscope to make sure its always transmitting properly.

 


data_list