Ben - apart from setting PORTB:3 as an output, I cant see anywhere in your code where you're setting the ports as inputs or outputs. I've not used the 2320 before (I use the 18F442 mainly) but this could be your problem. Cheers Dom ----- Original Message ----- From: "Ben Jackson" To: Sent: Friday, February 13, 2004 7:25 AM Subject: [PIC:] RE3 again, sample code, arrrgh > Here is my RE3 test program. I copy PORTE to PORTB. PORTB is 0V, even > though the (MCLR-compatible) button on pin 1 of the PIC is pulling it up. > > > include "p18f2320.inc" > __CONFIG _CONFIG1H, _IESO_OFF_1H & _INTIO2_OSC_1H > __CONFIG _CONFIG2L, _BOR_OFF_2L & _BORV_45_2L & _PWRT_ON_2L > __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H > __CONFIG _CONFIG3H, _CCP2MX_ON_3H & _MCLRE_OFF_3H > __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L > __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L > __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H > __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L > __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H > __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L > __CONFIG _CONFIG7H, _EBTRB_OFF_7H > > org 0x0 > bra main > > org 0x8 > retfie FAST > > main: > movlw b'01100010' ; RUN, 4MHz, intrc > movwf OSCCON > > bcf TRISB, 3 > > test: > movf PORTE, W > movwf PORTB > bra test > end > > > > -- > Ben Jackson > > http://www.ben.com/ > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.