Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • RFID Scan and Store to EEPROM Project

RFID Scan and Store to EEPROM Project

Determine Tag Numbers and Plan Database

First, you need to load the EEPROM fonts into your FLiP. Simply drag this block onto your Blockly workspace and download to the FLiP’s EEPROM.

Next, we’ll determine the numbers on your various RFID tags. Each tag has a seven-digit integer number (plus a few other numbers that represent the vendor ID, but we’re not using them in Blockly). The FLiP – RFID Reader for Numbers Blockly program can be used to read the tags and write their numbers to your OLED. Download it here:

Project4261-RFID-Read-Numbers.svg

Scan your tags and write the numbers you see from the OLED. The tag numbers I recorded were 2819869, 6618834, 2809834, 2810865 and 2841692. Yours will be different.

The next step would be to identify the names you’ll associate with the RFID tag numbers. Each RFID tag number is four bytes. Four bytes is 32 bits – or a word variable – which stores a number between zero and 2,147,483,647.

This example will associate the RFID tag number with the names of five recent presidents. Since the OLED’s maximum number of characters (using medium sans font) is eight we’ll use that as a limitation. The first and last name of recent presidents are each less than eight characters.   

When reading from memory it’s a good idea to arrange your data consistently. For example, 20 bytes can store the RFID tag number, first name, and last name of the president in the following format:

  • RFID tag number in bytes 0 through 3 (four bytes)
  • President’s first name in bytes 4 through 11 (eight bytes)
  • President’s last name in bytes 12 through 19 (eight bytes)
  • Every 20 bytes can be used for another record, as shown below.

It’s helpful to know exactly where this data is stored in the Propeller’s EEPROM, too. The FLiP uses a 64K byte EEPROM – with the lower half (32K bytes) being used for your program memory. This leaves the upper 32K bytes of space for storing other data. However, the Blockly creators allocated sections of this upper half of memory for the ActivityBot encoder calibration data and OLED fonts. This left locations 32,769 to 40,444 (7,675 bytes) for data of your choice.

Using our example with the RFID tag numbers and president names, 7,675 bytes could store 383 records (7,675 bytes divided by 20 bytes per record). This may be plenty of space for storing the presidential records, but imagine keeping track of weather data or inventory. For those projects it would be better to use the SD Card blocks. A look at how this 64K EEPROM memory is organized:  

Blockly also conveniently recalculates the memory locations so you can write to location 32,768 as location 0. A quick look at the C code equivalent shows how this is accomplished for you by adding 32,768 to your memory location:

void write_numbers_and_names_to_EEPROM()

{

   // RFID tag numbers take four byte locations

   // names take two eight byte locations

   ee_putInt(2819869, (32768 + constrain(0, 0, 7675)));

   ee_putStr(("Bill"), (strlen(("Bill")) + 1), (32768 + constrain(4, 0, 7675)));

   ee_putStr(("Clinton"), (strlen(("Clinton")) + 1), (32768 + constrain(12, 0, 7675)));

Printer-friendly version
Test Out the Full Program
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2026 Parallax Learn • Built with GeneratePress