Hello, =20 I am a PIC newbie, so bear with me. I have read the articles I could = find in the archives, but nothing was able to address my question = specifically, or I have already considered the ideas. I have also read = the newbie faq, and i think I have addressed the basics. Please let me = know if I have not. =20 Problems I am having: Basically, an LED connected to PORTA, bit 4 is not turning on. I think = it is because of the RC clock based on the following findings: 1) A measurement of the clock cycle going into OSC1 has Vmin=3D~1V and = Vmax=3D~3.8V. The spec requires a range of 1V (0.2 Vdd) - 4.5 V (0.9 = Vdd) in RC mode. I tried various combinations of resistors and = capacitors for the RC circuit, but this would not change the amplitude, = only the frequency. 2) The 5V source is drawn down to ~4V when I connect the RC circuit to = the OSC1 pin. I have tried two P/S methods a) One generic P/S suppling = a 12VDC signal which I then pass through a LM7805 5V voltage regular 2) = A 120-9VAC wall adaptor, through a full wave bridge rectifier and then a = simple voltage divider. I have also tried the voltage regulator on the = output of the rectifier circuit with the same results. =20 If I am way off base and the RC circuit is acceptable, what else could = be wrong based on my configuration. Configuration and Equipment 1. Microchip Pic16F877 2. Pin RA4 connected to a 220 Ohm resistor and bright red LED in series = to gnd=20 3. Grounded all unused pins I/O pins 4. Connected all Vss and Vdd pins 5. Downloaded a basic pgm to turn on Port A, bit 4. See below. 6. Selected proper clock type for the HS / RC for each configuration I = tried 7. Tied MCLR high unless I want to reset by momentarily connecting to = gnd 8. Code protection is off 9. MPLAB IDE to program the code and convert to HEX. Code was simulated = in MPLAB SIM and seems to operate OK 10. Warp 13-a program and board to download to the chip. Download and = verify is OK. 11. RC clock R=3D3333Ohm, C=3D40pF. - I am getting about 1MHz clock = cycle 12. I also tried a 19.xxx MHz crystal clock with HS mode selected, but = get no response. I did not have a proper scope to measure the clock = circuit so I abandoned this route. The code is as follows: =20 =20 =20 list p=3D16f877 ; list directive to define processor #include ; processor specific variable definitions =20 __CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _RC_OSC & = _WRT_ENABLE_ON & _LVP_ON & _DEBUG_OFF & _CPD_OFF=20 =20 ; '__CONFIG' directive is used to embed configuration data within .asm = file. ; The lables following the directive are located in the respective .inc = file. ; See respective data sheet for additional information on configuration = word. =20 ;*************************************SET UP Start = ********************************* org 0x000 ;Processor reset vector clrf PCLATH ;Ensure page bits are cleared goto main ;Go to beginning of program ;******************************* Set up End = ************************************* =20 ;******************************** Main Start = ******************************************** main =20 ;Initialize port A bcf STATUS,RP0 ;Set to=20 bcf STATUS,RP1 ; Bank 0 clrf PORTA ;Initialize port A by clearing output bsf STATUS,RP0 ;Set to=20 bcf STATUS,RP1 ; Bank 1 movlw 0x06 movwf ADCON1 movlw 0xCF movwf TRISA =20 bcf STATUS,RP0 ;Set to=20 bcf STATUS,RP1 ; Bank 0 =20 loop bsf PORTA,4 =20 =20 goto loop =20 end ;Directive 'end of program' ;*********************************** Main End = ********************************************* =20 Any help would be appreciated. =20 Regards, =20 Kevin Vandermaarel k vandermaarel@jmpeng.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu