Oberon Examples
The source code of these examples is located in your AstrobeRP2350-v9.3\Examples folders. You may also find additional source code examples on the Astrobe Forum.
The example programs which are shown with screenshots below use the Astrobe Out library module to generate text output and send it via a UART port on the development board to a COM port on the PC where it is displayed on the Astrobe terminal window. The examples have been tested on the supported RP2350 development boards. Serial communication is performed using the Astrobe Terminal and a UART to USB adapter connecting the board to the PC.
Filename | Description |
---|---|
Info.mod |
System Info Outputs the clock configuration, linker and startup parameters specified for the current application and shows the amount of RAM remaining for use by the program. |
ViewMemory.mod |
ViewMemory Outputs the contents of the first 64 words of memory starting from address Data Start and then the last 64 words of memory up to address Data End. Each line of output contains the address and the contents of the next 4-word block of data displayed in Hexadecimal format. |
TestTraps.mod |
TestTraps Demonstrates the trapping and display of runtime errors. |
UserTraps.mod |
UserTraps Demonstrates the trapping and user-defined display of runtime errors. |
CycleCount.mod Performance.mod |
Performance Shows how the number of instruction cycles can be counted for a section of code. Compares the relative performance of leaf and non-leaf procedures for WHILE, REPEAT and FOR loops. |
TestBits.mod Bits.mod |
TestBits Shows the results of example calls to the procedures in the Bits library module.
|
TestReals.mod Reals.mod |
TestReals Shows the results of example calls to the procedures in the Reals library module.
|
TestStrings.mod Strings.mod |
TestStrings Shows the results of example calls to the procedures in the Strings library module.
|
ByteArrays.mod VALByteArrays.mod |
ByteArrays Demonstrates the use of variables declared as ARRAY n OF BYTE to simplify and optimise the code required for tasks such as de-serialising / serialising complex data structures for Input / Output operations. VALByteArrays As above but using SYSTEM.VAL instead of ARRAY n OF BYTE. |
Extensions.mod ExtensionsCase.mod ExtensionsProc.mod Lists.mod |
Extensions Shows three different ways to use Oberon's Type Extension feature to create and scan a dynamic list of a variety of objects. Lists contains the generic functions to build and traverse a list of objects. Extensions contains definitions for a number of related objects. The examples used are shapes e.g. circles, rectangles etc. The application first builds a list of different shapes and then scans the list displaying the relevant dimensions and area of each shape. Extensions uses the IS operator to perform the type tests in association with type guards. ExtensionsCase uses a CASE statement to perform the type tests and selections. ExtensionsProc uses procedure variables as record fields to perform type-specific actions for the different record extensions. |
Blinker.mod |
Blinker Blinks an LED once per second using a timer. You may have to change the pin configuration-related statements depending on which pins your LEDs are connected to. See the Getting Started section of the Astrobe Help file for more information. |
IRQBlinker.mod IRQTimer.mod |
IRQ Blinker LED blinks approx. once per second as a result of interrupt requests (IRQ) generated by a timer. |
TestDateTime.mod RTC.mod DateTime.mod |
Set and Display a Real Time Clock implemented using TIMER1
Sets various values for date (days, months and years) and the current time (hours, minutes and seconds) and then displays the updated date and time for three seconds to demonstrate the values clocking over e.g. from the end of Feb to the start of March etc..
|
SlideDemo.mod Slide.mod IO.mod Graph.mod ST7735.mod Columbia.mod Columbia.res StPauls.mod StPauls.res |
AutoCAD Slide Drawing Uses the Astrobe Graphics line-drawing functions to display AutoCAD Slide images of St Paul's Cathedral and the space shuttle on an AdaFruit 1.8" TFT Display.
|
TextDisplay.mod Display.mod Font.mod ST7735.mod |
Text Display Write line-oriented output on an AdaFruit 1.8" TFT Display.
|
HCTest.mod HCConfig.mod HCDir.mod HCFiles.mod HCDrive.mod |
HCFiler Filesystem: HCTest Initialise an HCFiler filesystem and create a number of test files on an SDHC Card accessed via SPI.
|
HCReadSpeed.mod HCConfig.mod HCDir.mod HCDrive.mod |
HCFiler Filesystem: HCReadSpeed Time SDHC card sector reading speed on an HCFiler filesystem accessed via SPI.
|
Licence Agreement
Astrobe for RP2350 Examples Source Code
Copyright © 2006-2024 CFB Software.
https://www.astrobe.com
Permission to use, copy, modify, and/or distribute these examples in source code form (the "Software") for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
DISCLAIMER
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THE SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES OR LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DEALINGS IN OR USE OR PERFORMANCE OF THE SOFTWARE.