Brief Source Explanation |
|
| Explanation, using a piece of source code: Below is an example of how a Processor communicates with the Eeprom. The source code used, can be downloaded from the download section (the folder "Seca-divers"). It is the Secanix source code. Do not despair just yet, if you don't understand assembler. I don't either, certainly not this version :-) It is only the general idea you need to grasp from this explanation, not the details. Because this is a Seca file set, the INS (instructions) are Seca specific. Information about the Seca INS can be found in the chapter Coding Systems on the Seca pages. I have commented this source code in red italics. The bold printed texts are the real assembler commands. All the rest is comment in the source file. Code in the processor file:
;*************************************************
- Look in the eeprom file, hex-position 00.
COMM_EEPR CALL EEPROM_send
; Transmit data from external EEPROM
- Read the content of x consecutive bytes from the eeprom, starting at the mentioned position. (This is the content of the procedure "EEPROM_send")
GOTO
TX9000 ;
Transmit status bytes
- If all was OK, proceed to procedure "TX9000". (Procedure TX9000 gives the standard Seca answer for "All was OK", so"90 00"). Code in the eeprom file:
ORG 0x000
Hex location 00
; 0000-0007
The serial number in hexadecimal (8 bytes)
; 0008-000E
The number of providers, supported on the card (7 bytes)
ORG 0x010
Hex location 10
; 0010-0189
Next are the key data for all providers on the card As you can see in this example, the data starts with provider 00 00, the SECA provider The organization: As you can see in the above example, the organization of the Eeprom is very simple. All data is written as 1 long line of data with fixed length fields, so fixed offsets in the Eeprom. In database terms, this would be called a fixed length structure with fixed field- and record length. | |