GithubHelp home page GithubHelp logo

linuxha / apl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akund/apl

0.0 0.0 0.0 3.12 MB

Arduino Peripheral Library for VGA, PS2 and sound. C++ library with low RAM footprint

C++ 54.91% C 45.09%

apl's Introduction

APL v2.0 โ€“ Arduino Peripheral Library

COPYRIGHT (C) 2018-2021 Adrian Kundert
[email protected]

Introduction:

The APL development begun with an hobbyst project having as goal to design a single board computer with audio-video and PS/2 keyboard interfaces. Such open source implementations are already realized by other Atmel programmers like Nick Gammon and Sandro Maffiodo. Since every design is a resource tradeoff and my features priorization were different I came out with a different implementation. Indeed the VGA resolution was important but I wanted to keep the UART port available for communication and also use as less as possible RAM by storing the font/tile data in the PGM memory but which is a bit slower than reading from the RAM.

Features Overview:

  • Timer Interrupt based implementation (execution not impacted by the main loop)
  • Low RAM footprint by tile rendering from PGM memory (4 clocks / pixel)
  • Tile size is 6 px by 8 px (Text mode) or 8 px by 8 px (GraphicPgm and Graphic modes)
  • Runtime tile creation for the Graphic mode with tiles allocated in the RAM
  • Fast screen horizontal and vertical pixel scrolling for the GraphicPgm and Graphic modes
  • Optional hardware pixel multiplexer for RGB capability
  • PS/2 keyboard support
  • Sound Tone from 45 Hz to 12 KHz
  • SD card interface (TBD)

The APL is designed for Arduino software development environement. The hardware configuration is flexible from standart board like Arduino Uno or Nano,

Configuration Pixel height) Tile Resolution in Text mode (Pixel width) Tile Resolution in GraphicPGM mode (Pixel width) Tile Resolution in Graphic mode (Pixel width)
32 MHz (experimental) 160 29 (172) 19 (152) 17 (136)
24 MHz 160 19 (114) 13 (104) 11 (88)
16 MHz (Uno/Nano) 160 8 (48) 6 (48) 4 (32)

but can also be customized with an higher system clock for better performance. Additionally, an external pixel multiplexer circuit can be added to increase even more the pixel resolution.

Configuration Pixel height) Tile Resolution in Text mode (Pixel width) Tile Resolution in Graphic mode (Pixel width)
32 MHz (experimental) 160 29 (172) 21 (168)
24 MHz 160 20 (120) 14 (112)

Demo

Font (Text mode)

font demo

Pong (GraphicPGM mode) and Scolling (Graphic mode)

Sokoban (GraphicPGM mode)

Hardware Configuration

Arduino Uno/Nano board configuration (16 MHz)

uno

Bread board configuration (system clock up to 20 MHz and even more)

uno

Hardware pixel multiplexer (system clock up to 20 MHz and even more)

uno

Atmel Studio 7 Installation

  1. Having installed Atmel Studio 7

  2. Open the solution file "APL.atsln" for the demo application "Font" or "Pong" or "Sokoban"

  3. (if required) in config.h change the sys clock and Pixel_Mux definition:

    #define F_CPU 16000000UL // system clock

    #define PIXEL_HW_MUX // enable this define when Pixel Hardware Mux is used

  4. Build and Program your device

Arduino IDE Installation

  1. Having installed Arduino IDE version 1.8.10 or newer

  2. Import the APL library in your Arduino library folder: menu Sketch -> Include library -> add .ZIP Library

  3. Open the demo application "Font" or "Pong" or "Sokoban" with the Arduino IDE

  4. (if required) in APLcore.h and config.h change the sys clock and Pixel_Mux definition:

    #define F_CPU 16000000UL // system clock

    #define PIXEL_HW_MUX // enable this define when Pixel Hardware Mux is used

  5. Verify and Program your device

apl's People

Contributors

akund avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.