Home

Welcome to the Jalv2 & Jallib website!

JAL (Just Another Language, version 2) is an open source programming language built for programming PIC microcontrollers. If electronics is your thing, JAL is for you!

Jallib is a set of open source JALv2 libraries to make things work. Download our libraries to see what is available.

Check out our FREE The Tutorial Book for PIC microcontroller how-to's:

 

We are looking for more libraries and more fun! Please share and contribute!

 

JAL library for the TM1637

The TM1637 has been around for quite some time but there was no JAL library available but it is now. You can purchase modules that have a TM1637 on board including four 7-Segment LED displays. The TM1637 device is, however, capable of controlling 6 LED displays and the device supports the scanning of a keyboard with a maximum of 16 keys.

The JAL library tm1637.jal supports up to six LED displays and it supports the use of the keyboard. The number of LED displays controlled by the library is configurable but uses 6 LED displays as default.

JAL nRF24L01+ Library

There was a request for a JAL Library of the nRF24L01+ wireless transmitter/receiver module. The nice thing about this module is that it uses its own protocol to transmit and receive data, including automatic acknowledge handling. This reduces the amount of work that needs to be done by the PIC. You just have to send some bytes and verify if the transmission was OK. It has sufficient FIFO’s on board to buffer the received messages and it interfaces with the PIC via an SPI interface.

Nokia 5110 Display Library

JAL had a library for the very popular Nokia 3310 display. Unfortunately the library was not part of the release since there were some issues with the graphics features of it. In the meantime the 3310 display has been replaced by the 5510 which has the same functionality since it still uses the Philips PCD8544 display controller.

The Virtual Wire Library

In one of my projects I needed an inexpensive but reliable RF link over which I could send a few bytes of data. A popular and inexpensive transmitter and receiver is available on the 433 MHz frequency band using Amplitude Shift Keying (ASK). The challenge was to set up a reliable link using these devices.

JALPIC One Development Board

In order to make JAL programming easy without the need of a programmer, the JALPIC One development board was created. This board has the same type of connectors as the Arduino Uno and the connections are - where possible - the same as the Arduino Uno.

Using the ESP8266 with a PIC to create your IoT device.

Recently I created a library with the name 'esp8266.jal' for connecting a PIC to your WiFi. The library is based on an ESP8266 ESP12-F and it based on version 2.0.0 of the ESP8266 AT command set.
The ESP8266 interfaces with the PIC using a UART.

MP3 Player

This is an MP3 schematic I've created. See the attached PDF.

It includes the following features:

- USB
- SD Card
- Hard Disk
- VS1053B mp3 decoder (with line in, line out & microphone).
- 23k256 for extra ram (used by FAT32 lib), not required.
- 74HC08 to allow for additional SPI devices.
- Serial port
- LCD (Not yet connected). May have run out of pins.

The schematic needs to be tested for errors.

FET H-Bridge Motor Controller

Circuit for H-Bridge Motor Speed Controller for PIC microcontroller.

18f4620_motor_hbridge.jal

Note: I have not tested with the Schottky diodes. I have ordered them. I may blow my FETs with feedback voltage spikes from the motor.

 

 

I want split a word variable to two bytes, or into bits, what's the best way to do it in JAL?

A common way to address the individual bytes of a word (or larger)
variable is to split it as an array of bytes.

This can be done as follows

var word w
var byte wb[2] at w

You can then refer the two bytes of the word w as wb[0] and wb[1]

To define bits within a byte, you may do the following:
var byte my_byte
var bit my_bit at my_byte : 0
var bit*3 my_bits at my_byte : 1

If the individual bytes of an array need a specific name alias keyword can be used as given below.

Pages