Advertisement
Advertisement

Rolling-code generator uses flash microcontroller

-May 03, 2001

Many security-alarm systems require the use of a random number. A computer program uses this random number to create a sequence of random numbers to prevent unwanted visitors from gaining entry into a protected facility. You can use a "rolling-code generator" to produce random numbers. To implement such a generator, you would typically need a microcontroller with external memory. Instead, you can use National Semiconductor's COP8SBR flash µC with "virtual-EEPROM" technology. This technology allows you to use a section of flash memory as if it were EEPROM. Because this µC is a true-flash device, the maximum number of erase/write cycles is typically 100,000 cycles. The flow chart in Figure 1 and the C code in Listing 1 show the adaptation of a textbook LFSR (linear-finite shift register) to the COP8 flash µC.

An initial "seed" first drives the nput. The seed then traverses several exclusive-OR stages. The routine then saves the result to a virtual-EEPROMlocation. This approach allows an embedded-system designer to easily create a highly secure system without incurring the cost of an external nonvolatile memory, such as a dedicated serial EEPROM. You can find additional information about the COP8SBR and its virtual-E2 feature at http://www.national.com/cop8.


Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES