HELP!! Pleas....PIC16F627a can't make usart receive interrupt work

Hi

Can someone take a peek at the code below and see if I have enabled the USART on the PIC16F627A correctly please.

All I want to do right now is set up a pic running @ 10MHz to 28800 baud and jump to my interrupt routine when it see a char. I can't make it happen. I have done this lots f times on other PICS but am getting nowhre in the 627A.

Please also see the lines reagrding TRISB - there is an errata for pic16f627a that mentions setting TRISB.

all help greatfully received - thanks

LIST p=16F627A #INCLUDE __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _HS_OSC

ORG 0x000 goto START

ORG 0x004 goto SerialIRIRQ

START

call InitUart ; init uart baud rate etc.... bsf INTCON,GIE ; enable interrupts

MAIN

NOP NOP NOP NOP NOP goto MAIN

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

InitUart ;Initialises the PIC UART for 28800 baud

;
Reply to
Anbeyon
Loading thread data ...

I have not checked the entire code, but it jumps into my eye that you have not enabled the peripherial interrupt PEIE at register INTCON.

HTH Wolfgang

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.