PDA

View Full Version : Serin problem using portc on a pic18f2610



Sphere
- 22nd October 2006, 23:08
Im using a pic 18F2610, when I use serin2 on portb.2 I get good data but when I use serin2 on portc.3 I just get zeros on my lcd display. Ive included my config for the chip but im asuming I have not switched off the extra features of portc.


@CONFIG_REQ
@ __CONFIG _CONFIG7H, _EBTRB_OFF_7H
@ __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
@ __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H
@ __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
@ __CONFIG _CONFIG5H, _CPB_OFF_5H
@ __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
@ __CONFIG _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _DEBUG_OFF_4L & _ENHCPU_OFF_4L
@ __CONFIG _CONFIG3H, _CCP2MX_PORTBE_3H & _PBADEN_OFF_3H
@ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
@ __CONFIG _CONFIG2L, _BORV_42_2L & _PWRT_ON_2L & _BOREN_OFF_2L
@ __CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H


CMCON = 7'disable analog comparator
ADCON0 = 0'disable A/D
TRISC.3 = 0

Thanks Sphere...

Sphere
- 24th October 2006, 19:31
Problem solved: Just got replacement chip today all ports ok. All this hasle for a bit more code space. Just give me an pic16f876 with 64k and ill be happy.

Sphere...