JAL (compiler)

Last updated

JAL (Just Another Language) is a Pascal-like programming language and compiler that generates executable code for PIC microcontrollers. It is a free-format language with a compiler that runs on Linux, MS-Windows and MS-DOS (OSX support). It is configurable and extendable through the use of libraries and can even be combined with PIC assembly language.

Contents

History

JAL was originally created by Wouter van Ooijen and released as free software under the GNU General Public License in 2003. In 2006, Stef Mientki initiated the development of a new version, JALV2, which was programmed by Kyle York and beta tested by an international user group. [1]

Sample code

-- JAL 2.3 include 16f877_bert--define the variables var byte resist--define the pins pin_a0_direction = input--variable resistor pin_d7_direction = input--switch pin_c2_direction = output--pwm led--enable pulse width modulation PWM_init_frequency (true, true)  forever loop--convert analog on a0 to digital    resist = ADC_read_low_res(0)     -- run measurement through flash memory    program_eeprom_write(2000,resist)    program_eeprom_read(2000,resist)     -- run measurement through data memory    data_eeprom_write(10,resist)    data_eeprom_read(10,resist)     -- if the switch is pressed return random value    if pin_d7 == high then       resist = random_byte    end if--send resistance to PC    serial_sw_write(resist)    delay_100ms(1)    -- set actual PWM duty cycle    PWM_Set_DutyCycle (resist, resist)  end loop

Related Research Articles

Brainfuck is an esoteric programming language created in 1993 by Urban Müller.

Forth is a procedural, stack-based programming language and interactive environment designed by Charles H. "Chuck" Moore and first used by other programmers in 1970. Although not an acronym, the language's name in its early years was often spelled in all capital letters as FORTH, but Forth is more common.

Microcontroller Small computer on a single integrated circuit

A microcontroller is a small computer on a single metal-oxide-semiconductor (MOS) integrated circuit (IC) chip. A microcontroller contains one or more CPUs along with memory and programmable input/output peripherals. Program memory in the form of ferroelectric RAM, NOR flash or OTP ROM is also often included on chip, as well as a small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications consisting of various discrete chips.

EEPROM Computer memory used for small quantities of data

EEPROM (also E2PROM) stands for electrically erasable programmable read-only memory and is a type of non-volatile memory used in computers, integrated in microcontrollers for smart cards and remote keyless systems, and other electronic devices to store relatively small amounts of data by allowing individual bytes to be erased and reprogrammed.

An esoteric programming language is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, as software art, as a hacking interface to another language, or as a joke. The use of esoteric distinguishes these languages from programming languages that working developers use to write software. Usually, an esolang's creators do not intend the language to be used for mainstream programming, although some esoteric features, such as visuospatial syntax, have inspired practical applications in the arts. Such languages are often popular among hackers and hobbyists.

AVR microcontrollers

AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers. AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.

I²C Serial comunication bus

I2C (Inter-Integrated Circuit, eye-squared-C) and is alternatively known as I2C or IIC. It is a synchronous, multi-master, multi-slave, packet switched, single-ended, serial communication bus invented in 1982 by Philips Semiconductors. It is widely used for attaching lower-speed peripheral ICs to processors and microcontrollers in short-distance, intra-board communication.

Atari BASIC

Atari BASIC is an interpreter for the BASIC programming language that shipped with the Atari 8-bit family of 6502-based home computers. Unlike most BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC and differs in significant ways. It includes keywords for Atari-specific features and lacks support for string arrays, for example.

PIC microcontrollers

PIC is a family of microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to Peripheral Interface Controller, and is currently expanded as Programmable Intelligent Computer. The first parts of the family were available in 1976; by 2013 the company had shipped more than twelve billion individual parts, used in a wide variety of embedded systems.

TI MSP430

The MSP430 is a mixed-signal microcontroller family from Texas Instruments, first introduced on 14 February 1992. Built around a 16-bit CPU, the MSP430 is designed for low cost and, specifically, low power consumption embedded applications.

The PIC16C84, PIC16F84 and PIC16F84A are 8-bit microcontrollers of which the PIC16C84 was the first introduced in 1993 and hailed as the first PIC microcontroller to feature a serial programming algorithm and EEPROM memory. It is a member of the PIC family of controllers, produced by Microchip Technology. The memory architecture makes use of bank switching. Software tools for assembler, debug and programming were only available for the Microsoft Windows operating system.

In computer science, a lookup table is an array that replaces runtime computation with a simpler array indexing operation. The savings in processing time can be significant, because retrieving a value from memory is often faster than carrying out an "expensive" computation or input/output operation. The tables may be precalculated and stored in static program storage, calculated as part of a program's initialization phase (memoization), or even stored in hardware in application-specific platforms. Lookup tables are also used extensively to validate input values by matching against a list of valid items in an array and, in some programming languages, may include pointer functions to process the matching input. FPGAs also make extensive use of reconfigurable, hardware-implemented, lookup tables to provide programmable hardware functionality.

BASIC-PLUS is an extended dialect of the BASIC programming language that was developed by Digital Equipment Corporation (DEC) for use on its RSTS/E time-sharing operating system for the PDP-11 series of 16-bit minicomputers in the early 1970s through the 1980s.

MBASIC is the Microsoft BASIC implementation of BASIC for the CP/M operating system. MBASIC is a descendant of the original Altair BASIC interpreters that were among Microsoft's first products. MBASIC was one of the two versions of BASIC bundled with the Osborne 1 computer. The name "MBASIC" is derived from the disk file name MBASIC.COM of the BASIC interpreter.

PICAXE

PICAXE is a microcontroller system based on a range of Microchip PIC microcontrollers. PICAXE devices are Microchip PIC devices with pre-programmed firmware that enables bootloading of code directly from a PC, simplifying hobbyist embedded development. PICAXE devices have been produced by Revolution Education (Rev-Ed) since 1999.

PLANC is a high level computer programming language. The acronym stands for Programming LAnguage for Nd Computers.

Parallax Propeller

The Parallax P8X32A Propeller is a multi-core processor parallel computer architecture microcontroller chip with eight 32-bit reduced instruction set computer (RISC) central processing unit (CPU) cores. Introduced in 2006, it is designed and sold by Parallax, Inc.

Pic Micro Pascala.k.a. PMP is a free Pascal cross compiler for PIC microcontrollers. It is intended to work with the Microchip Technology MPLAB suite installed; it has its own IDE (Scintilla-based) and it is a highly optimized compiler.

Arduino Uno

The Arduino Uno is an open-source microcontroller board based on the Microchip ATmega328P microcontroller and developed by Arduino.cc. The board is equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards (shields) and other circuits. The board has 14 digital I/O pins, 6 analog I/O pins, and is programmable with the Arduino IDE, via a type B USB cable. It can be powered by the USB cable or by an external 9-volt battery, though it accepts voltages between 7 and 20 volts. It is similar to the Arduino Nano and Leonardo. The hardware reference design is distributed under a Creative Commons Attribution Share-Alike 2.5 license and is available on the Arduino website. Layout and production files for some versions of the hardware are also available.

BASIC interpreter

A BASIC interpreter is an interpreter that enables users to enter and run programs in the BASIC language and was, for the first part of the microcomputer era, the default application that computers would launch. Users were expected to use the BASIC interpreter to type in programs or to load programs from storage.

References

  1. Beta testing by: Bert van Dam, Sunish Isaac, Dave Lagzdin, Javier Martinez, Stef Mientki, Wouter van Ooijen, Michael Reynolds, André Steenveld, Joep Suijs, Vasile Surducan, and Michael Watterson