CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC24F RX2 doesn't work(SOLVED)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
E_Blue



Joined: 13 Apr 2011
Posts: 403

View user's profile Send private message

PIC24F RX2 doesn't work(SOLVED)
PostPosted: Wed Feb 03, 2021 4:24 pm     Reply with quote

CCS v5.091
MPLAB X IDE 5.15
ICD3
PIC24FJ1024GB606

I'm trying to receive data on pin RG9 at 19200bps but get nothing.
The PIC is connected to 3.3V and the GPS at UART2 send 2.8V data.
I get not even a single interrupt
I can send data correctly but not receive; so I think that the bps are set it correctly.

2.8V is not enough?

This is a reduced code.
Code:

#pin_select U2TX=PIN_D5
#pin_select U2RX=PIN_G9
#use rs232(UART2,stream=GPS,NOINIT)

void main()
{
output_b(0);
   output_c(0);
   output_d(0);
   output_e(0);
   output_f(0);
   output_g(0);
   
    set_tris_b(0b1001001001010110);
    set_tris_c(0b0110000000000000);
    set_tris_d(0b111100000011);//RTS=GSM OUT=D2 RTS=GSM_IN=D1 - RD4=SPI_DO - RD5=SPI_DI - RD6=SPI_CLK - RD7=SPI_CS
    set_tris_e(0b11000011);
    set_tris_f(0b10000000);
    set_tris_g(0b11001000000);
   
    SETUP_PMP(PAR_DISABLE,0);
    SETUP_PSP(PAR_DISABLE,0);
    SETUP_CLC1(CLC_DISABLED);
    SETUP_CLC2(CLC_DISABLED);
    SETUP_CLC3(CLC_DISABLED);
    SETUP_CLC4(CLC_DISABLED);
    SETUP_CAPTURE(1,CAPTURE_OFF);
    SETUP_CAPTURE(2,CAPTURE_OFF);
    SETUP_CAPTURE(3,CAPTURE_OFF);
    SETUP_CAPTURE(4,CAPTURE_OFF);
    SETUP_CAPTURE(5,CAPTURE_OFF);

    setup_uart(GPS_BPS1,GPS);

}


Should I configure something more?
_________________
Electric Blue


Last edited by E_Blue on Wed Feb 03, 2021 4:58 pm; edited 1 time in total
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 03, 2021 4:42 pm     Reply with quote

You had the same issue about 1-1/2 years ago and it was solved in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=58305
E_Blue



Joined: 13 Apr 2011
Posts: 403

View user's profile Send private message

PostPosted: Wed Feb 03, 2021 4:57 pm     Reply with quote

It seems like I'm running in circles. Confused
I'm the ones that need to kick the same stone twice. Embarassed
Thanks. Rolling Eyes
_________________
Electric Blue
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Feb 03, 2021 6:19 pm     Reply with quote

re:
Quote:
It seems like I'm running in circles.

Just to let you know....It gets worse the older you get !!!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Feb 04, 2021 1:31 am     Reply with quote

and the circles get smaller... Sad
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group