Author Topic: SBC66EC - UART - PPS  (Read 2059 times)

Joseph (Jiju)

  • Sr. Member
  • ****
  • Posts: 31
    • View Profile
SBC66EC - UART - PPS
« on: December 06, 2011, 03:22:26 PM »

Update June 2012
Our Netcruzer range of products has now got it's own web site at www.netcruzer.com, with a new forum at www.netcruzer.com/forum.
For all new posts relating to the Webserver Firmware, please USE THIS FORUM.



Hi,
I am trying to enable and use 4 USART on the SBC66EC, using the Peripheral Pin Select. I am using a WaveShare TTL-RS232 converter.

So far, all good, except that I have to touch CON1 pins with my finger to get the communication going!

What could be the reason? I've tried 4 different WaveShare TTL-RS232 converters. Same result.

I am trying to replace the WaveShare TTL-RS232 converter with another brand/make. Will get them in hand some time tomorrow.

In the meantime, I thought may be someone else might have faced this situation!

Code used:
------------------------------8<------------------8<----------------------------------------------

void ConfigUsedPins(void)
{
ANSBbits.ANSB0 = 0;                 // RB0 as Digital, CTS
ANSGbits.ANSG6 = 0;                 // RG6 as Digital, TX
ANSGbits.ANSG7 = 0;                 // RG7 as Digital, RX

TRISBbits.TRISB0 = 1;               // RB0 as Input, CTS
TRISGbits.TRISG6 = 0;               // RG6 as Output, TX
TRISGbits.TRISG7 = 1;               // RG7 as Input, RX

AD1CON1bits.ADON = 0;           // disable ADC

TRISBbits.TRISB6 = 0;           // System LED Output

}

void SetPeripheral()
{
//__builtin_write_OSCCONL(OSCCON & 0xBF);             // Unlock PPS
PPSUnLock;

// COM1
iPPSInput(IN_FN_PPS_U2RX, IN_PIN_PPS_RP21);         // Assign U2RX to pin RP21
iPPSOutput(OUT_PIN_PPS_RP26, OUT_FN_PPS_U2TX);      // Assign U2TX to pin RP26
iPPSInput(IN_FN_PPS_U2CTS,IN_PIN_PPS_RP0);    //Assing U2CTS to pin RP32
CloseUART2(); 


//__builtin_write_OSCCONL(OSCCON | 0x40);             // Lock PPS
PPSLock;
}
------------------------------>8--------------------------->8-------------------------------

Many Thanks.

« Last Edit: May 31, 2012, 05:29:51 PM by modtro2 »

Joseph (Jiju)

  • Sr. Member
  • ****
  • Posts: 31
    • View Profile
Re: SBC66EC - UART - PPS
« Reply #1 on: December 06, 2011, 09:08:36 PM »
Hi,
I've replaced the TTL-RS232 with another set of boards (3 different from another manufacturer), still the same result. Touching the pins on the TTL-RS232 boards produces no results, but if I touch it on the SBC66EC CON1, communcation resumes.

Any thoughts about this ?

Cheers,