Hi Bill, Sorry about the problems. As people noted, there is an issue with ledon - you have to write to ADCON1 to change PORTA from an analog input to digital I/O. Here is the corrected application: title "ledon - Turn on a LED when a Button is Pressed" ; ; This is the First Program to be Burned in and Run in a PIC. ; ; The Program simply sets up Bit 0 of Port "A" to Output and then ; Sets it Low when RA0 is pulled low. ; ; Hardware Notes: ; _MCLR is tied through a 4.7K Resistor to Vcc and PWRT is Enabled ; A 220 Ohm Resistor and LED is attached to PORTB.0 and Vcc ; A 10K pull up is connected to RA0 and it's state is passed to ; RB0 ; ; Myke Predko ; 99.12.03 ; 02.01.10 - Added Write to "ADCON1" to Put PORTA in Digital I/O ; mode ; LIST R=DEC ifdef __16F84 INCLUDE "p16f84.inc" endif ifdef __16F877 INCLUDE "p16f877.inc" endif ; Registers ifdef __16F84 __CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON else __CONFIG _CP_OFF & _DEBUG_OFF & _XT_OSC & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _WRT_ENABLE_ON & _BODEN_ON & _CPD_OFF endif ; __IDLOCS 0x01234 PAGE ; Mainline of ledon org 0 nop ; "nop" is Required for Emulators bsf PORTB, 0 ; Make the LED on PORTB.0 "off" bsf STATUS, RP0 ; Goto Bank 1 to set Port Direction bcf TRISB ^ 0x080, 0 ; Set RB0 to Output ifdef __16F877 movlw 7 ; Make PortA Digital I/O for PIC16F877 movwf ADCON1 ^ 0x080 else nop ; Make sure Space required is always the same nop endif bcf STATUS, RP0 ; Go back to Bank 0 Loop movf PORTA, w ; Simply Transfer PORTA.0 to PORTB.0 movwf PORTB goto Loop end Again, sorry about the hassles - if you have any more problems let me know. Right now due to workload I am lurking and will reply to help out with problems, myke ----- Original Message ----- From: "mr. man" To: Sent: Sunday, February 09, 2003 10:35 PM Subject: [PIC]:el cheapo 16F877 problem > Hi, > I bought Myke Predko's "Programming and Customizing > PIC Micro Microcontrollers." I'm using the El Cheapo > board, software and MPLAB 6.1. I tried the "ledon" > experiment and it worked with a 16F84A, then I tried a > 16F877, it programmed and verified OK but when I put > it in the circuit the LED turned on and stayed on > regardless or input. I tried the home built version of > el cheapo and got the same results. I saw some posts > about Low Voltage Programming mode (LVP) and tried a > 10K from RB3 to ground but got the same results. > Has anyone gotten the el cheapo to work with the > 16F877? > > Thank you, > Bill > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu