Q
Quan
Guest
I did have that!
I fixed the code and it WORKS!
I just gotta create a shorter directory and IT IS ALIVE!!!
I fixed the code and it WORKS!
I just gotta create a shorter directory and IT IS ALIVE!!!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
;*** WDT reset toggles RB0
list p=16F628A
include <p16F628A.inc>
__CONFIG 0x3F34
org 0
bsf STATUS, RP0
movlw b'00001110'
movwf OPTION_REG
movlw b'11111110'
movwf TRISB
bcf STATUS, RP0
xorwf PORTB, f
sleep
end
Connecting to MPLAB ICD 2
ICD0019: Communications: Failed to open port: (Windows::GetLastError() = 0x2, 'The system cannot find the file specified.
')
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled.
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x7)
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0054: MPLAB IDE has lost communications with the MPLAB ICD 2. Would you like to attempt to reconnect?
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
ICD0082: Failed MPLAB ICD 2 operation
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x7)
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Reading...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICDWarn0038: When using auto-calculate write range, reads cover the entire memory range. Do you wish to continue?
...EEPROM
...Program Memory (0x0 - 0x7FF)
.. Config Memory
...User ID Memory
...Read Succeeded
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7FF)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
...EEPROM
...User ID Memory
...Verify Succeeded
Programming Configuration Bits
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
04-Oct-2007, 17:18:01
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7FF)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
...EEPROM
...User ID Memory
...Verify Succeeded
Programming Configuration Bits
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
04-Oct-2007, 17:25:49
MPLAB ICD 2 Ready
Reading...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICDWarn0038: When using auto-calculate write range, reads cover the entire memory range. Do you wish to continue?
...EEPROM
...Program Memory (0x0 - 0x7FF)
.. Config Memory
...User ID Memory
...Read Succeeded
MPLAB ICD 2 Ready
Reading...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...EEPROM
...Read Succeeded
MPLAB ICD 2 Ready
Blank Checking...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x3FFF, Val Read = 0x0)
...Device not blank
MPLAB ICD 2 Ready
Erasing Target Device...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Erase Succeeded
MPLAB ICD 2 Ready
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICD0200: Operation Aborted (Warning 51).
ICD0275: Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICD0200: Operation Aborted (Warning 51).
This msg is telling you that the ICD2 is not able to read the target chips device ID. It is a show stopper.ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
Sorry about blowing up, it appeared that the problem was human error
This a good chance to get you feet wet with the inchworm.Krumlink said:That sound's like a good idea actually. I have the Resistors DIP sockets, but not the caps, ST232 16F877 (I have the A version, but I dont know how to program it ) or the other misc sockets. I am restocking my stuff soon here.
You can not program it with the code from Bill's poster. The 16F877 is close but you still need to figure out a new CONFIG value and change the include statement.Can I use a 16F887?