The 16C54 is an example of a one time programmable (OTP) device.
The 16C54 device was brought out before the 16F84.
The main difference between them is that the 16C54 is not electrically erasable, it has to be erased by UV light for about 15 minutes.
The 16C54 JW version is UV erasable.
The 16C54LP is a one time (only) programmable (OTP), 32 kHz version.
You would use a 16C54 JW for development and then program a OTP device for your final circuit. The OTP device has to be selected for the correct oscillator i.e. LP for 32kHz crystal, XT for 4MHz, HS for 20MHz and R-C for an R-C network.
The header for use with the 16C54 is shown below.
;HEADER54.ASM for 16C54. | This sets PORTA as an INPUT (NB 1 |
; | means input) and PORTB as an OUTPUT |
; | (NB 0 means output). The OPTION |
; | register is set to /256 to give timing pulses |
; | of 1/32 of a second. |
; | 1 second and 0.5 second delays are |
; | included in the subroutine section. |
;******************************************************************
; EQUATES SECTION
;******************************************************************
LIST | P=16C54 | ;we are using the 16C54. |
ORG | 01FFH | ;the start address in memory is 1FF at the |
;end. | ||
GOTO | START | ;goto start! |
ORG | 0 |
;******************************************************************
;******************************************************************
;CONFIGURATION SECTION
;******************************************************************
This header can now be used to write programs for the 16C54 Microcontroller.
There are a number of differences between the 16F84 and the 16C54 that the header has taken care of, but be aware of the differences when writing your program.
• The 16C54 does not use Banks so there is no need to change from one to the other.
• There are only 7 Registers on the 16C54 (see 16C54 Memory Map Table 9.1). So the user files start at number 7. i.e. COUNT EQU 7, TIME EQU 8.
• The 16C54 does not have the instruction SUBLW. So in the DELAY subroutine the delay is moved into a file called TIME. (NB. TIME EQUATES TO 8) Then the delay in the file is subtracted from W, giving the same result as for the 16F84.
• Why bother using the 16C54? The reprogrammable 16C54 i.e. 16C54JW is more expensive than the 16F84. But the one time programmable (OTP) 16C54 i.e. 16C54/04P is cheaper. So when your design is final you can blow the program into the cheaper 16C54/04P. Why bother with the expensive 16C54JW and not the 16F84 for program development? I don't know! Only convenience – not having to change the program.
• The 16C54JW has to be erased under an ultra violet lamp for about 15 minutes – this is a bind if you are impatient, you may need a couple.
• Pin 3 is only a T0CKI pin it does not double as A4 like the 16F84 and must be pulled high if the T0CKI is not being used.
FILE ADDRESS | FILENAME |
00 | INDIRECT ADDRESS |
01 | TMR0 |
02 | PC |
03 | STATUS |
04 | FSR |
05 | PORTA |
06 | PORTB |
07 | USER FILE |
08 | USER FILE |
09 | USER FILE |
0A | USER FILE |
0B | USER FILE |
0C | USER FILE |
0D | USER FILE |
0E | USER FILE |
0F | USER FILE |
10 | USER FILE |
11 | USER FILE |
12 | USER FILE |
13 | USER FILE |
14 | USER FILE |
15 | USER FILE |
16 | USER FILE |
17 | USER FILE |
18 | USER FILE |
19 | USER FILE |
1A | USER FILE |
1B | USER FILE |
1C | USER FILE |
1D | USER FILE |
1E | USER FILE |
1F | USER FILE |
18.118.210.133