Project Files of SAM R21 Xplained Pro Library for Proteus: 802.15.4 Simulation
43ea6ac076a649bc8050130c56b7f5fd.zip

SAM R21 Xplained Pro Library for Proteus V1.0
SAM R21 Xplained Pro Library for Proteus V1.0 comes as a ZIP archive of 309 files (4.0 MB, 9.5 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch, an Arduino library, compiled HEX firmware and source code.
- LIBProteus library
- DLLProteus model
- DSNProteus simulation
- INOArduino sketch
- LIBArduino library
- HEXHEX firmware
- SRCSource code
Description
SAM-R21-Xplained-Pro-Library-for-Proteus-v1.0.zip with Microchip's SAM R21 Xplained Pro in Proteus (your sketch with EXT1 pins 3 .. 18, LED0, SW0, IEEE 802.15.4 frames by RF233 and a serial monitor; TEPSAMR21.LIB, TEPNET.DLL and the TEP Boards for Proteus add-on 1.73.0), the PIR and relay libraries, the two-board hall light demo with its sketches and a README.
File Structure
3.1 KB3.1 KB1.1 KB7.7 KB11 KB8.5 KB1.5 KB1.7 KB1.9 KB5.7 KB4.9 KB1.1 KB5.8 KB9.6 KB7.2 KB2.5 KB2.1 KB1.9 KB2.1 KB4.4 KB1.1 KB3 KB3 KB1.8 KB2.5 KB3.5 KB149 B2.7 KB2 KB6.4 KB3.2 KB1.3 KB963 B8.6 KB5.9 KB6 KB12 KB1.6 KB1.3 KB14.7 KB4.3 KB6.1 KB20.1 KB8.2 KB2 KB4.5 KB311 B12.8 KB6.7 KB6.1 KB2.2 KB3.4 KB5.9 KB1.5 KB1.6 KB16.6 KB9.7 KB6.9 KB2.1 KB533 B5.7 KB7.4 KB514 B1.7 KB896 B481 B1.4 KB1012 B482 B936 B559 B467 B3.6 KB3.8 KB504 B956 B575 B455 B8.3 KB10.9 KB522 B79 B5.5 KB3.1 KB79 B442 B918 B1.4 KB1.8 KB1 KB1.3 KB1.4 KB1.8 KB1.4 KB5.7 KB502 B463 B5 KB6.5 KB3.4 KB3.4 KB500 B1.6 KB368 B406 B466 B404 B444 B460 B477 B739 B448 B1.3 KB350 B5.7 KB4 KB562 B1.5 KB2 KB550 B7.2 KB4.1 KB371 B4.5 KB3.5 KB492 B390 B478 B6.6 KB2.4 KB479 B5.1 KB1.9 KB1.3 KB1.3 KB750 B1.3 KB490 B2.2 KB1.9 KB498 B1.2 KB1.2 KB487 B5.1 KB4.6 KB371 B3.6 KB2.5 KB534 B1.5 KB1.2 KB478 B6.2 KB3 KB1.5 KB1.7 KB469 B1 KB1.7 KB433 B294 B358 B1.3 KB2.5 KB13.2 KB3.8 KB659 B510 B4.4 KB1.9 KB5.8 KB11 KB835 B518 B308 B1.3 KB3.3 KB568 B6.4 KB2.3 KB29 B436 B9.2 KB4.9 KB439 B4.2 KB1.5 KB9.3 KB7.1 KB4.7 KB2.4 KB388 B5.1 KB893 B667 B1.3 KB5.5 KB2.3 KB1.8 KB468 B882 B530 B791 B487 B894 B2 KB730 B646 B2.6 KB977 B702 B20.6 KB1.8 KB11.8 KB3.2 KB596 B406 B6.3 KB5.7 KB9.3 KB7.7 KB7.7 KB6.1 KB5.8 KB5.9 KB6.4 KB6.4 KB5.3 KB5.6 KB5.7 KB7.9 KB7.7 KB6.5 KB6.3 KB6.2 KB10.3 KB8.5 KB6.6 KB7.6 KB6.7 KB6.1 KB6.7 KB8.3 KB6.2 KB7.2 KB5.9 KB5.6 KB5.7 KB6.7 KB5.9 KB6.2 KB6 KB6 KB6.1 KB6.3 KB6 KB6.1 KB6.2 KB6 KB5.8 KB6.4 KB6.4 KB6.9 KB6 KB6.8 KB7 KB6.3 KB6.4 KB6.5 KB6.5 KB6.6 KB6.5 KB5.6 KB6.6 KB5.9 KB7.5 KB3.8 KB5.4 KB7.7 KB7.1 KB5.8 KB5.9 KB5.9 KB6.9 KB5.7 KB5.9 KB5.5 KB5.5 KB7.1 KB5.2 KB35.9 KB25.9 KB1.3 KB8.5 KB36 KB391.6 KB490.4 KB29.1 KB400 KB2.9 MB330 KB25.2 KB28.7 KB28 KB400 KB2.9 MB330 KB11.4 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in SAM R21 Xplained Pro Library for Proteus: 802.15.4 Simulation. Open an image for its full size.












README
SAM R21 XPLAINED PRO LIBRARY FOR PROTEUS - V1.0 (YOUR ARDUINO SKETCH, IEEE 802.15.4, LED0 AND SW0)
Designed by The Engineering Projects
www.TheEngineeringProjects.com
IMPORTANT LINKS
Article (read it first - pictures, step by step, every feature explained):
https://www.theengineeringprojects.com/2026/11/sam-r21-xplained-pro-library-for-proteus.html
Report a bug or suggest a feature (our forum):
https://www.theengineeringprojects.com/forum
Support us (the libraries are free):
https://www.theengineeringprojects.com/donate
FILE STRUCTURE
SAM-R21-Xplained-Pro-TEP-v1.0/
|-- Proteus Library Files/
| |-- TEPHCSR501.LIB 391.6 KB the PIR sensor (demo), to LIBRARY
| |-- TEPRELAY.LIB 490.4 KB the relay (demo), to LIBRARY
| |-- TEPSAMR21.LIB 29.1 KB the SAM R21 Xplained Pro, to LIBRARY
|-- Proteus Model Files/
| |-- TEPHCSR501.DLL 400.0 KB the PIR sensor, to MODELS
| |-- TEPNET.DLL 2.93 MB the board + monitors + network, to MODELS
| |-- TEPRELAY.DLL 330.0 KB the relay, to MODELS
|-- Arduino Code/
| |-- SAMR21_Hall_Base/SAMR21_Hall_Base.ino 3.1 KB the demo sketch
| |-- SAMR21_Hall_Node/SAMR21_Hall_Node.ino 3.1 KB the demo sketch
| |-- TEP Boards for Proteus/hardware/ 1.21 MB the Arduino IDE add-on 1.73.0 (294 files)
|-- Proteus Simulation/
| |-- SAMR21_Hall_Base.hex 28.7 KB the demo sketch (U2)
| |-- SAMR21_Hall_Node.hex 28.0 KB the demo sketch (U1)
| |-- SAMR21-802154-Hall-Light.pdsprj 25.2 KB the demo: an 802.15.4 hall light and doorbell
| |-- TEPHCSR501.DLL 400.0 KB copy of the model
| |-- TEPNET.DLL 2.93 MB copy of the model
| |-- TEPRELAY.DLL 330.0 KB copy of the model
|-- README.txt ~10.9 KB this file
Total: 9.49 MB (unzipped). The source code of the models is not included.
WHAT IS IT?
Proteus 8 has no ATSAMR21 model, so this is NOT a real ATSAMR21. Our team has put a lot of effort into building this
board ourselves: it is Microchip's SAM R21 Xplained Pro (ATSAMR21-XPRO) - the black evaluation kit with the ATSAMR21G18A
(an Arm Cortex-M0+ at 48 MHz with the AT86RF233 2.4 GHz IEEE 802.15.4 transceiver inside; 256 KB of flash, 32 KB of
RAM), the radio's crystal, the ceramic chip antenna and the SMA socket, the Embedded Debugger (EDBG) with its
micro-USB, the yellow user LED0, the user button SW0 and RESET, the EXT1 extension header and the power header - drawn
compact, and it runs YOUR Arduino sketch in Proteus:
* Microchip makes no Arduino core for this kit, so the pins have TEP names: EXT1_PIN_3 .. EXT1_PIN_18 (also
EXT1_ADC_P / _N, EXT1_GPIO1 / 2, EXT1_PWM_P / _N, EXT1_IRQ, SDA / SCL, SS / MOSI / MISO / SCK), LED0, SW0. You
compile with our board package "TEP Boards for Proteus" 1.73.0 (in Arduino Code - see INSTALLATION).
* IEEE 802.15.4 works through our RF233 library: a PAN ID, a 16-bit short address and a channel 11 .. 26; frames of up
to 26 bytes to one board or to every board of the PAN (RF233_BROADCAST), with rssi() and lqi(). The boards of one
design that share the PAN ID and the channel hear each other.
* LED0 lights when LOW (LED_BUILTIN is LED0). SW0 reads LOW while you hold it: click it on the board in the running
simulation.
TEP additions: the EDBG's USB opens the serial monitor (the same window as our TEP Serial Monitor Advance).
Limits (say them before you start): RF233 is our library, not an 802.15.4 stack: no MAC acknowledgements or retries (the
demo sends its own), no security, beacons or 6LoWPAN. EXT3, the other headers and the chip antenna / SMA switch are
drawn, not modelled. Your sketch gets 8 KB of RAM in the simulation (the real one: 32 KB), about 256 KB of flash, and
int is 16 bits in the simulation (use long for big numbers). See MODEL SCOPE AND LIMITS.
ONE DEVICE (search "SAMR21" in Pick Devices):
SAMR21-XPRO "SAM R21 Xplained Pro" V1.0 (Microprocessor ICs > 802.15.4 Boards), prefix U, model TEPNET.DLL.
Its TEP window has no Windows title bar: the serial monitor (the EDBG's USB, 115200 baud: Monitor, Plotter and Board
tabs).
The same TEPNET.DLL also runs our other sketch boards; it replaces any older TEPNET.DLL (keep only this newest one in
MODELS).
TEST STATUS
V1.0: verified in Proteus 8.5 on 17 Nov 2026 with the demo project as shipped. What the Proteus run showed:
* SAMR21-802154-Hall-Light: U1 "802.15.4 ready: PAN 0x2121, address 0x0002, channel 15", U2 "802.15.4 base ready: PAN
0x2121, address 0x0001, channel 15".
* The PIR's window, Walk in: U1 ">> MOTION (frame 1)", LED0 on; U2 "<< Node 0x0002: MOTION (-42 dBm, LQI 211)",
">> Hall light ON" (the relay on); U1 "<< The base confirmed MOTION".
* SW0 on U1: ">> BELL (frame 2)"; U2 ">> DING DONG - someone is at the door!", its LED0 on for 3 s.
* Walk out: ">> CLEAR (frame 3)", the node's LED0 off; U2 "the light goes off in 5 s", then ">> Hall light OFF".
* about 25 s of simulation, no errors, no repeats needed, with both monitors open.
INSTALLATION (about 3 minutes)
1. Close Proteus. Extract the WHOLE ZIP to a normal folder (e.g. Desktop).
2. Copy everything in "Proteus Library Files" to the LIBRARY folder of Proteus, for example:
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY
(on some PCs: C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\LIBRARY). TEPSAMR21.LIB is the board;
TEPHCSR501.LIB and TEPRELAY.LIB are the demo's PIR sensor and relay.
3. Copy the DLLs from "Proteus Model Files" to the MODELS folder (...\Proteus 8 Professional\MODELS) - replace an older
TEPNET.DLL (this one is the first that knows this board).
4. Delete TEPSAMR21.IDX from the LIBRARY folder if it is there.
5. The Arduino IDE (only to compile your own sketches - the demo has its HEX files): copy the folder
"Arduino Code\TEP Boards for Proteus\hardware" into your sketchbook folder (normally Documents\Arduino), so that
Documents\Arduino\hardware\tep\avr\boards.txt exists (replace an older copy); restart the IDE. The Arduino AVR Boards
platform must be installed (it comes with IDE 1.8.x; in IDE 2.x install "Arduino AVR Boards" from the Boards
Manager once).
Tools > Board > TEP Boards for Proteus > Microchip SAM R21 Xplained Pro (TEP Proteus). RF233 is in the board package.
6. Start Proteus. In Pick Devices (P) search "SAMR21".
RUN THE DEMO
Keep the .hex files and the DLLs beside the project in "Proteus Simulation".
SAMR21-802154-Hall-Light.pdsprj - two SAM R21 Xplained Pro boards on 802.15.4 (PAN 0x2121, channel 15): U1
(SAMR21_Hall_Node.hex, address 0x0002) is the hall node with the PIR sensor U3 on EXT1 pin 5; U2 (SAMR21_Hall_Base.hex,
address 0x0001) is the base with the hall light's relay RLY1 on EXT1 pin 7. No wire between the boards.
Press Run. Both monitors print "802.15.4 ... ready: PAN 0x2121". In the PIR's window click Walk in: the node sends
MOTION (its LED0 on), the base prints "Node 0x0002: MOTION" with the signal and switches the hall light on. Click SW0
on U1: the doorbell - "DING DONG" on the base and its LED0 on for 3 s. Walk out: CLEAR, and the light goes off 5 s
later. Each frame is confirmed by the other board ("The base confirmed ...").
Closed a window? The EDBG's USB opens the monitor.
THE PINS (the label on the board, the core's number, what it can do in the simulation)
ADC+, ADC- 0, 1 EXT1 3 / 4: analogRead 0 .. 1023 for 0 .. 3.3 V (A0 / A1), or GPIO
GPIO1 .. IRQ 2 .. 6 EXT1 5 .. 9: GPIO, PWM (analogWrite), interrupt
SS_B 7 EXT1 10: GPIO (the second SPI select)
SDA, SCL 8, 9 EXT1 11 / 12: Wire, the I2C bus
RX, TX 10, 11 EXT1 13 / 14: Serial1
SS .. SCK 12 .. 15 EXT1 15 .. 18: SPI (SS, MOSI, MISO, SCK)
ID, VCC, GND, 5V, VIN, RESET the ID pin (drawn), 3.3 V, ground, 5 V, the board's reset
LED0 (16) is the yellow user LED, lit when LOW; SW0 (17) the user button, LOW when pressed (pinMode INPUT_PULLUP).
Serial is the EDBG's virtual COM port: the board's built-in monitor. The radio is inside the chip (not on the header
pins).
PROPERTIES (double-click the part > Edit Properties)
PROGRAM the sketch's HEX (Arduino IDE: Sketch > Export Compiled Binary, board Microchip SAM R21 Xplained Pro)
MONITOR YES = the built-in serial monitor on Serial; BAUD its speed (115200, or AUTO)
AUTOOPEN YES = the monitor window opens at Run (the demo: YES)
TROUBLESHOOTING
* The other board hears nothing: both need the same PAN ID and channel, and the frame must go to its address (or to
RF233_BROADCAST).
* A frame gets lost now and then: confirm every frame and repeat it until the confirmation comes, as the demo does.
* LED0 looks inverted: it lights when the pin is LOW.
* SW0 seems dead: use pinMode(SW0, INPUT_PULLUP) and act on the change to LOW.
* An integer goes wrong above 32767: int is 16 bits in the simulation - use long.
BUG REPORTS AND FEATURE REQUESTS
Please post them in our forum with a screenshot and the Serial Monitor text:
https://www.theengineeringprojects.com/forum
LICENCES AND THIRD-PARTY NOTES
* The board model (TEPNET.DLL) and the symbols and artwork (TEPSAMR21.LIB) are made by The Engineering Projects. The
source code of the models is not included.
* TEP Boards for Proteus (Arduino Code): its core, the variants and the EEPROM, SPI and Wire libraries are modified
copies of the Arduino AVR core 1.8.6 - GNU Lesser General Public License 2.1 (LGPL 2.1, the text:
LICENSE-LGPL-2.1.txt); its RF233 library and the others and our core files are MIT (LICENSE-MIT.txt).
* Proteus is a product of Labcenter Electronics and is not included. SAM, Xplained, Microchip and Atmel are names of
Microchip Technology, Arduino of Arduino. This library is not made or endorsed by them or by Labcenter.
REBUILDING THE FIRMWARE (OPTIONAL)
The HEX files are supplied. Install TEP Boards for Proteus (INSTALLATION step 5), open Arduino Code\SAMR21_Hall_Node (or
SAMR21_Hall_Base), select Microchip SAM R21 Xplained Pro (TEP Proteus) and use Sketch > Export Compiled Binary. For a
real board use Microchip Studio or MPLAB X with the LwMesh or MiWi stack, or RIOT OS (the samr21-xpro board): the same
PAN IDs, addresses and channels. Its pins work at 3.3 V.
MODEL SCOPE AND LIMITS
Modelled: EXT1 pins 3 .. 18; digital I/O, analogRead 0 .. 1023, PWM (analogWrite), tone and attachInterrupt through the
board model; Serial (the board's monitor), Serial1, Wire and SPI; LED0, SW0 and RESET; 802.15.4 frames between the TEP
boards of the design (PAN ID, short addresses, channels 11 .. 26, RSSI, LQI).
Not modelled: the ATSAMR21 itself, the radio's MAC (acknowledgements, retries, CSMA), security, EXT3, the antenna
switch. The simulation runs below real time.
VERSION
TEP SAM R21 Xplained Pro library V1.0 (Nov 2026). Device SAMR21-XPRO (TEPSAMR21.LIB / TEPNET.DLL), TEP Boards for
Proteus 1.73.0 (adds this board: RF233 for 802.15.4, EXT1_PIN_3 .. EXT1_PIN_18, LED0, SW0).
Demo sketches SAMR21_Hall_Node and SAMR21_Hall_Base V1.0. Demo parts: HC-SR501 (Advance), Relay Module (Advance).Development1 release
-
V1.0SAM R21 Xplained Pro Library for Proteus V1.0this page
V1.0 is the only release in the Download Center so far. When a newer version is published, it appears above with its own download page.
Installation10 steps
From the download to a working project, in order. The steps follow what the package contains.
You will need
- Proteus Design SuiteProteus 8 or newer (Labcenter), on Windows
- Arduino IDE1.8 or 2.x, with the board of the tutorial chosen under Tools → Board
- MPLAB X IDEto build the source files into firmware
- Any archive toolWindows, macOS and Linux extract ZIP files on their own
Steps
- 1
Extract the archive
Right-click 43ea6ac076a649bc8050130c56b7f5fd.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (SAM-R21-Xplained-Pro-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move TEPHCSR501.LIB, TEPRELAY.LIB and TEPSAMR21.LIB and the files into the LIBRARY folder of your Proteus installation: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY for Proteus 8, or the matching Proteus 7 folder. Older versions keep it under ProgramData\Labcenter Electronics. If Proteus is open, close it first.
- 3
Add the simulation model
Copy TEPHCSR501.DLL, TEPNET.DLL and TEPRELAY.DLL into the MODELS folder next to LIBRARY, so the component can run, not only be drawn.
- 4
Restart Proteus and place the component
Start Proteus, open a schematic, press P (Pick Devices) and search for the component by the name used in the tutorial. It appears with its pins ready to wire.
- 5
Install the Arduino library
In the Arduino IDE choose Sketch → Include Library → Add .ZIP Library and pick the library, or copy its folder into Documents\Arduino\libraries. Restart the IDE to see its examples.
- 6
Open the sketch in the Arduino IDE
Open SAMR21_Hall_Base.ino, SAMR21_Hall_Node.ino and eeprom_clear.ino and 18 more, select your board and port under Tools, then Verify. Sketch → Export Compiled Binary writes the HEX file a simulation needs.
- 7
Build the source code
Open abi.cpp, Arduino.h and binary.h and 52 more in the compiler named in the tutorial (MikroC, Keil, MPLAB, Code Composer or the Arduino IDE) and build it to get the firmware.
- 8
Load the HEX file
In Proteus double-click the microcontroller, set Program File to SAMR21_Hall_Base.hex and SAMR21_Hall_Node.hex and run the simulation. For real hardware, flash the same file with your programmer.
- 9
Open the example simulation
Open SAMR21-802154-Hall-Light.pdsprj in Proteus to see the wiring exactly as in the tutorial. Check the controller's Program File path, then press Play.
- 10
Follow the tutorial
SAM R21 Xplained Pro Library for Proteus: 802.15.4 Simulation explains every connection and setting in order; keep it open beside the files while you build.
FAQs9 questionsContact TEP
How do I download SAM R21 Xplained Pro Library for Proteus V1.0?
Wait for the 30-second guest countdown on this page, then press the download button; the file comes straight from our storage. Members who are logged in skip the wait. If the browser opens the file instead of saving it, use its Save as option. The download link is made for you when the countdown ends and works for 15 minutes; a saved or shared link stops working, so share this page instead.
What is inside the archive?
SAM R21 Xplained Pro Library for Proteus V1.0 comes as a ZIP archive of 309 files (4.0 MB, 9.5 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch, an Arduino library, compiled HEX firmware and source code. Open the File Structure tab for the full list of 309 files.
What should I do if the download does not start?
Check the browser's download list first; an ad blocker or a company firewall can also hold it back, so try another browser or network. If the file arrives incomplete, download it again. For an installation problem, read the Install tab or tell us in the comments with your software version and the exact error message.
Is this file free?
Yes. Every file in the TEP Download Center is free for learning, personal and student projects. If you share it, link back to this page or the tutorial so others find the latest version.
How do I check that the file arrived complete?
Compare its SHA-256 with the one on this page, bb3027e8e9d71b4bae699666452b81f02d67c2d41a5e78198e8cfebf1eba51c0. In PowerShell run Get-FileHash "43ea6ac076a649bc8050130c56b7f5fd.zip"; on macOS or Linux run shasum -a 256 "43ea6ac076a649bc8050130c56b7f5fd.zip". The same value means the file is exactly the one in our storage; a different one means the download broke off, so download it again.
Do I need WinRAR to open the ZIP file?
No. Windows, macOS and Linux open ZIP archives on their own (Extract All, or double-click). WinRAR and 7-Zip work too. Extract the whole archive before using the files.
Where do I put the LIB and IDX files?
Both files go into the LIBRARY folder of your Proteus installation (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY; Proteus 7 has the same folder under its own name). Restart Proteus afterwards and search for the component with P.
Which Proteus version does the library need?
The tutorial names the Proteus version the library was made and tested with. Most TEP libraries work in Proteus 7 and Proteus 8; if the component does not appear after a restart, check that both the LIB and the IDX file were copied and that Proteus was fully closed while copying.
How do I get the HEX file into the simulation?
Compile the sketch in the Arduino IDE (Sketch → Export Compiled Binary gives you the HEX next to the sketch), then in Proteus double-click the board, set Program File to that HEX and run.
Members skip the wait. Log in or join TEP.
- 0Total downloads
- 4%Popularity
- ProteusCategory
- 0Comments
- ssyedzainnasirUploaded by
- 20 Nov 2026Uploaded at
bb3027e8e9d71b4bae699666452b81f02d67c2d41a5e78198e8cfebf1eba51c0
















Comments
0