Oberon Examples
The source code of these examples is located in your AstrobeM7-v9.3\Examples folders. You will 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 Cortex-M7 development boards. They allow the serial communication to be performed via a virtual COM port using a USB cable to connect 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. |
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. |
ShowTime.mod RTC.mod Time.mod |
Set and Display the Real Time Clock
Prompts for the input of the current time (hours, minutes and seconds) and then displays the updated time every second.
|
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.
|
Temperature.mod I2CConfig.mod Time.mod |
I2C Temperature Logger Measures the current temperature via the I2C bus using a Texas Instruments TMP102 sensor. This sensor is available on the convenient SparkFun SEN-13314: TI Digital Temperature Sensor Breakout. The temperature is checked every second using the Real Time Clock. The current time and temperature is displayed whenever the temperature changes. |
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.
|
DRAMTest.mod |
DRAM Test Tests 4164 64kbit DRAM chips for a variety of failures. It has been used on retrocomputing projects and could be modified to test other types of RAM chips. |
Licence Agreement
Astrobe for Cortex-M7 Examples Source Code
Copyright (c) 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.