# GR64 and PIC 16F876

**URL:** <https://forum.sierrawireless.com/t/gr64-and-pic-16f876/2629>\
**Category:** Legacy AirPrime modules\
**Created:** [October 29, 2008, 1:12pm UTC](https://forum.sierrawireless.com/t/gr64-and-pic-16f876/2629 "2008-10-29T13:12:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbdev](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@fbdev](https://forum.sierrawireless.com/u/fbdev)\
**Post date:** [October 29, 2008, 1:12pm UTC](https://forum.sierrawireless.com/t/gr64-and-pic-16f876/2629/1 "2008-10-29T13:12:38Z")

</div>

Hi everybody.

I’m working in a project using GR64 and a microcontroller 16F876. The comunication between both is through RS232 protocol, in GR64 using the function UTS and in the 16F876 I’m using RS232 Interruption.

In GR64 the code is:

uts(1,3,0);  
uts(“data\r”,4);  
utc(0,0,0);

In PIC 16F876 the code is:

char data[8];

#int\_RDA  
void RDA\_isr()  
{  
strcpy(data,"");

if(kbhit()){  
gets(data);  
}  
}

void main()  
{  
setup\_adc\_ports(NO\_ANALOGS);  
setup\_adc(ADC\_OFF);  
setup\_spi(FALSE);  
setup\_timer\_0(RTCC\_INTERNAL|RTCC\_DIV\_1);  
setup\_timer\_1(T1\_DISABLED);  
setup\_timer\_2(T2\_DISABLED,0,1);  
enable\_interrupts(INT\_RDA);  
enable\_interrupts(GLOBAL);

printf("%s\n\r", data);  
}

When I send data with Hyperterminal to the PIC, the circuit works OK but when I connect GR64 and start the embbebed program, the program in the PIC 16F876 stops.

Any idea??
