BASCOM-TV. TV Code Features: ICs supported: BASCOM versions:

Similar documents
Senior Design Project: Blind Transmitter

Design of Vision Embedded Platform with AVR

TV Synchronism Generation with PIC Microcontroller

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

XTAL Bank DDS Version 0.02 Sept Preliminary, highly likely to contain numerous errors

TRIMBLE GPS / 10MHz REFERENCE MONITOR DISPLAY V January 2015

VGA Port. Chapter 5. Pin 5 Pin 10. Pin 1. Pin 6. Pin 11. Pin 15. DB15 VGA Connector (front view) DB15 Connector. Red (R12) Green (T12) Blue (R11)

RF4432 wireless transceiver module

IS01BFRGB LCD SmartDisplay from NKK Switches Low cost implementation featuring the ATtiny13A from Atmel Complete software solution

Project Final Report. Z8 Arcade! 4/25/2006 James Bromwell,

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

APPLICATION NOTE. Atmel AVR32850: ATSAM4L-EK User Guide. Atmel SAM4L. Features. Introduction

DOGM GRAPHIC SERIES 128x64 DOTS

IS01BFRGB LCD SmartDisplay from NKK Switches Simple implementation featuring the ATmega88PA from Atmel Complete software solution

Overview of BDM nc. The IEEE JTAG specification is also recommended reading for those unfamiliar with JTAG. 1.2 Overview of BDM Before the intr

DOGM GRAPHIC SERIES 132x32 DOTS

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

o The 9S12 has a 16-bit free-running counter to determine the time and event happens, and to make an event happen at a particular time

8 PIN PIC PROGRAMMABLE BOARD (DEVELOPMENT BOARD & PROJECT BOARD)

o The 9S12 has a 16-bit free-running counter to determine the time and event happens, and to make an event happen at a particular time

Tutorial Introduction

RF4432F27 wireless transceiver module

Design and implementation (in VHDL) of a VGA Display and Light Sensor to run on the Nexys4DDR board Report and Signoff due Week 6 (October 4)

Analog to Digital Conversion

DESIGN AND DEVELOPMENT OF A MICROCONTROLLER BASED PORTABLE ECG MONITOR

Combo Board.

Hello and welcome to this presentation of the STM32L4 Analog-to-Digital Converter block. It will cover the main features of this block, which is used

7 SEGMENT LED DISPLAY KIT

Tearing Effect with Solomon SSD1963 Display Controller

N3ZI Digital Dial Manual For kit with Serial LCD Rev 3.04 Aug 2012

Design and Implementation of an AHB VGA Peripheral

TV Character Generator

N3ZI Digital Dial Manual For kit with Backlit LCD Rev 4.00 Jan 2013 PCB

LCD Triplex Drive with COP820CJ

AL330B-DMB-A0 Digital LCD Display SOC Demo Board

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Part 2 -- A digital thermometer or talk I2C to your atmel microcontroller

Using the Siemens S65 Display

JTAGcable II In Circuit Emulator for Atmel AVR microcontrollers. User s Guide REV 1.0. Many ideas one solution

Section bit Analog-to-Digital Converter (ADC)

8-BIT MCU WITH SINGLE VOLTAGE FLASH MEMORY, DATA EEPROM, ADC, TIMERS, SPI

Alice EduPad for Tiva or MSP432 TI ARM Launchpad. User s Guide Version /23/2017

Specification for HTPA32x31L10/0.8HiM(SPI) Rev.4: Fg

This document describes a program for 7-segment LED display (dynamic lighting).

8 DIGITAL SIGNAL PROCESSOR IN OPTICAL TOMOGRAPHY SYSTEM

Alice EduPad Board. User s Guide Version /11/2017

Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li

PHYS 3322 Modern Laboratory Methods I Digital Devices

IMS B007 A transputer based graphics board

HD66840/HD LVIC/LVIC-II (LCD Video Interface Controller) Description. Features

CH7053A HDTV/VGA/ DVI Transmitter

Hitachi Europe Ltd. ISSUE : app084/1.0 APPLICATION NOTE DATE : 28/04/99

16 Dec Testing and Programming PCBA s. 1 JTAG Technologies

How to overcome/avoid High Frequency Effects on Debug Interfaces Trace Port Design Guidelines

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

DOGM GRAPHIC SERIES. 128x64, 3.3V available in low quantity! flat: 5.6mm with LED b./l. mounted TECHNICAL DATA ORDERING CODE ACCESSORIES

fbas_enc: FBAS(CVBS) encoder for PAL and/or NTSC

EA DOGL128x-6 EA LED68X51-RGB

Digital (5hz to 500 Khz) Frequency-Meter

MSP430-HG2231 development board Users Manual

ELECTRONIC GAME KIT ESSENTIAL INFORMATION. Version 2.0 BUILD YOUR OWN MEMORY & REACTIONS

Christmas LED Snowflake Project

Tutorial Introduction

Chapter 5 Flip-Flops and Related Devices

MSP430-H2618 development board Users Manual

Integrated Circuit for Musical Instrument Tuners

PHILIPS Anubis A(AC) Chassis

TSIU03: Lab 3 - VGA. Petter Källström, Mario Garrido. September 10, 2018

@DonAndrewBailey

AD9884A Evaluation Kit Documentation

DLP200M 2 Relay Module for Heating and Cooling Plants

Radio Clock with DCF77

bit TFT Digital Driver Board Specification

ECE 4510/5530 Microcontroller Applications Week 3 Lab 3

SPI Serial Communication and Nokia 5110 LCD Screen

Microcontrollers. Outline. Class 4: Timer/Counters. March 28, Timer/Counter Introduction. Timers as a Timebase.

uresearch GRAVITECH.US GRAVITECH GROUP Copyright 2007 MicroResearch GRAVITECH GROUP

Hello, and welcome to this presentation of the STM32 system window watchdog. It will cover the main features of this peripheral used to detect

18 Nov 2015 Testing and Programming PCBA s. 1 JTAG Technologies

Watchman. Introduction: Door Lock Mobile MAX

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

Downloads from:

HD66766 Rev. 1.0 / 30 November 2001 HD (132 x 176-dot Graphics LCD Controller/Driver for 65K Colors)

An Introduction to CY8C22x45

Lab 3 LCD Mar

SDA 3302 Family. GHz PLL with I 2 C Bus and Four Chip Addresses

Brief Description of Circuit Functions

This document describes a program for 7-segment LED display (dynamic lighting) and key matrix and input.

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

AVRcam Code Commentary. Version 1.3

XJTAG. Boundary Scan Tool. diagnosys.com

Analog-to-Digital Converter

Experiment 7 Fall 2012

SUBSYSTEMS FOR DATA ACQUISITION #39. Analog-to-Digital Converter (ADC) Function Card

Using the Siemens S65 Display

Device for a inserting text into a video-signal

Decade Counters Mod-5 counter: Decade Counter:

11AK30 / MONO - SERVICE MENU

User Manual. Product Link:

Entry Level Tool II. Reference Manual. System Level Solutions, Inc. (USA) Murphy Avenue San Martin, CA (408) Version : 1.0.

Transcription:

BASCOM-TV With this software module you can generate output directly to a TV - via an RGB SCART connection - from BASCOM (AVR), using a just few resistors and a 20 MHz crystal. Write your program with the powerful but easy to use BASCOM compiler for AVR, and display whatever you need on any TV which has a SCART socket. Useful for debugging as well as for the final product. This is a photo of the TV display function working on a flat panel LCD TV set The actual display is perfectly straight, some distortion is seen here caused by the camera optics. Full development kit now available for commercial use. Includes built & tested board, pre-programmed sample IC, TV generation software module including all pixel data which can be edited, plus full support from the developer. For non-commercial use simply use a "Kite" system which already has the TV code programmed into the IC and can hold up to six separate 4K programs selectable by jumpers or switches. TV Code Features: * Generates a 55 column colour TV character display from an AVR MPU without any extra ICs * Connects via a standard SCART socket giving a sharp RGB output signal (not composite video) * Flexible RAM use - display RAM can be as large or small as needed * Completely interrupt driven software - transparent to user * Character pixel data can be edited or replaced by the user to allow custom characters The TV software can be customised to special user requirements (e.g. differing character sizes) but is time critical machine code - please use the contact page for advice on different display formats. ICs supported: This code is for the ATMega 48/88/168/328 ICs. A PCB is available for testing and / or production. The code can be ported to other ATMega AVR ICs which have 512 bytes or more RAM, and a clock of 16-20 MHz. See the contact details page to discuss your requirements. BASCOM versions: When using the company licence (which allows as many copies as you need) you will also require a registered copy of BASCOM to allow sufficient Flash program memory for most projects, as the binary include file for the TV output code is 2.5K, leaving only 1.5K of available space for your program out of the 4K maximum space allowed in the demo version of BASCOM.

How to use BASCOM with the TV software module The TV display is very simple to use from a programming point of view. As it runs entirely within the ATMega chip, it uses internal RAM to hold the display data. This means that all you have to do to write to the display is write bytes to the RAM which is allocated to the TV screen area. To start with you need to include the following 7 lines of code in your BASCOM program: On Oc2a Tvinterrupt Nosave Goto Main!.org $100 $inc Tvinterrupt, Nosize, "tvinc.bin" Return Main: $include "tv.inc.bas" You don't need to worry about these statements, you can just cut & paste this into your program and it will work. After including these lines of code you can make the TV display work simply by moving bytes to the screen area in the internal RAM. The amount of RAM used by the display is very flexible. It can be any number of bytes up to the maximum possible which is 12 lines of around 56 bytes per line, maximum 672 bytes. The minimum number of bytes which can be used is just one! This byte would be the "End of Screen" code which has to be the very last byte of any screen. In fact, if the interrupt is disabled, then no RAM is needed at all, and you will also have full CPU usage until you enable the interrupt again. To disable the TV software all you need to do is: DISABLE OC2A this will halt the TV code and allow all RAM to be used by your application, then ENABLE OC2A to start the TV code again. You will need to make sure the screen RAM area contains sensible display data before enabling the interrupts. You can use all of the on-chip RAM to do calculations and for temporary storage, you only need to free enough RAM as you need for the screen while it is actually displaying. For further examples of how to use the display RAM, see the following BASCOM programs: - ADCTest6.bas This program reads the 6 ADC inputs and displays the values as six bar graphs on screen in real time. - BarTest6.bas If the ADCs cannot be connected to anything interesting, this program displays six random bar

graphs to simulate the ADCs. - SerialIn1.bas This program reads characters from the serial port and displays them on the TV screen. If the serial port is connected via infra red or radio this provides a wireless TV display. Bascom TV FAQs Q: How can I add TV output to my BASCOM application? A: If you are using an ATMega48/88/168/328 everything is already set up for you to use. If you want to use another ATMega IC, you need to refer to the technical information and make sure that the IC you are using has enough hardware resources (CPU speed, SPI port, RAM etc). You can't just add TV output to any AVR chip - ATTiny ICs are not supported as the TV code uses the hardware multiply instruction, and only ATMega ICs have enough RAM. Q: What about low power applications? A: Whilst TV output is enabled, power consumption will be around the maximum given in the data sheet for the IC at the speed and voltage used. TV output should be disabled when not needed, then the IC can benefit from all the low power and sleep modes available. This would be relevant to any device which is normally in low power mode, but can have a TV attached to display data only when required. Q: What about CPU intensive applications? A: As explained in the previous Q/A about low power, the TV output can be switched off (by disabling the relevant interrupt) so the full CPU power is available, however most applications can easily run in the spare time (approx 20%) of the CPU when running at 16 or 20 MHz.

Bascom TV Software Module - TECHNICAL INFORMATION You do not have to read this information - BASCOM and the TV code will automatically set up the hardware as required. If you use the supplied PCB this ensures the TV output will work without any knowledge of the module. These technical details are for reference. The TV code has various fixed hardware requirements as follows. Clock: The clock MUST use an external crystal to produce a stable screen. Normally 20 MHz but 16 MHz can be used (20% less columns). SPI port: The SPI hardware is used by the TV code and cannot be used for other purposes while the TV code is running. RAM use: * Amount of RAM used can be very small - EndScreen code marks end of RAM used * Lines are variable length so only visible characters [excepting space] use RAM RAM Addresses: * The address of RAM used by the TV code is fixed at $100 (start of RAM in ATMega 48/88/168/328 ICs) * The first six bytes of RAM are used to store variables for the interrupt code * The first byte of RAM used for the screen area is at address $106 Maximum RAM use: * For a full screen of 55 characters by 12 lines, RAM used = 660 bytes * In an ATMega48, used screen RAM will need to be kept below around 450 bytes for use with BASCOM GPIO register: In ATMega 48/88/168/328 ICs there is a "GPIO" register at $1E. Bit 0 of this is used by the code. The other 7 bits are unused and can be changed by the user software. Pixel data: * The pixel data used for the characters shown on screen starts at a fixed Flash ROM word address * All pixel data can be edited or replaced by the user to allow custom characters Timers: * Timer 2, an 8 bit timer, is reserved for use by this code * Timer 2 causes a 64µS interrupt and can be used for a system "tick" * Timers 0 and 1 are unused Reset and interrupt vectors: * The interrupt vectors for Timer 2 compare match A and B are both used * Timer/Counter2 Compare Match B vector points to the TV interrupt code Control characters: * End of line code = EndLineCode = $0D * End of screen code = EndScreenCode = $0C * Set colour to yellow chars on a red background = SetYellowCode = $10 * Set colour to green chars on a black background = SetGreenCode = $11 * Set colour to cyan chars on a blue background = SetBlueCode = $12

* Set colour to white chars on a magenta background = SetWhiteCode = $16 All of Port B is reserved: * PB0 Sync * PB1 Blue * PB2 Red * PB3 Green * PB4 & PB5 [2] allocated SPI pins * PB6 & PB7 [2] Used for XTAL No pins on Ports C or D are used Interrupt Code: * Triggered by Timer 2 interrupt * Runs every 64 us * Consumes up to 80% of CPU time [worst case] Fuses: Only the low fuse needs to be changed: CKDIV8 must be high (unprogrammed) so clock will be at full freq (default 0 = programmed) 1 CKOUT Clock output (default 1 = unprogrammed) i.e. clock output off 1 SUT1 Select start-up time (default 1 = unprogrammed) 1 SUT2 Select start-up time (default 0 = programmed) SUT1,2 = 11 selects Crystal Oscillator, slowly rising power (in case of PSU problems) 0111 in CKSEL 3210 selects full swing oscillator, slowly rising power so lfuse = $F7