Grifo

Top  Previous  Next

EXAMPLES

BASCOM - BASIC

 

bm64

 

 

The content of this page is provided by Grifo.

As following you can find a wide range of demo programs.The programs have been realized to be used on a well-known hardware, as the K51-AVR or the DEB-01, etc. in order to avoid any doubts about the interpretation of the results.

The demo programs are well documented in order to allow a fast approach for anybody.In addition to that, being the same demoes written in different languages, it is possible to get an efficient comparison both for Quality and Speed terms.

I N D E X

B A S I C

Examples - \BASCOM-LT
Examples - \BASCOM-8051
Examples - \BASCOM-AVR

 

SHORT PROGRAM DESCRIPTION

x_AD11

This program monitors one anagogic channel out of eleven, managed by IC12 (TLC2543), visualization of the channel is in hexadecimal format, through T1 and T2 the channel to convert is selected, T1 increments while T2 decrements.

The display shows first the channel being converted, then the 12 bits wide hexadecimal value of the channel converted: Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_AD4

This program monitors one analogue channel out of four, managed by IC12 (PCF8591), visualization of the channel is in hexadecimal format, through T1 the channel to convert is selected: Whenever a key is pressed, an acoustic signal is emitted.

Display DY1 shows the channel to convert, while displays DY3 and DY4 show the converted value in HEX.

Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_DA

This program monitors one D/A converter channel on IC2 (PCF8591), key T1 increments the value, while key T2 decrements the value which is shown in hexadecimal format the 7 segments displays.

Whenever a key is pressed, an acoustic signal is emitted.

Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_REE

This program allows to read a serial EEPROM on IC4 (max 24c08), with addresses ranging from &H400 to &H7ff, addresses from &H0 to &H0FF are taken by IC7 (RTC PCF8583) while addresses from &H100 to &H3FF are free space.

At start the program shows the address where to write, through keys T1 and T2 the value in incremented or decremented.

Through key T3 the address is accepted and the value read at such address is shown.

Whenever a key is pressed, an acoustic signal is emitted.

Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_WEE

This program allows to write to a serial EEPROM on IC4 (max 24c08), with addresses ranging from &H400 to &H7ff, addresses from &H0 to &H0FF are taken by IC7 (RTC PCF8583) while addresses from &H100 to &H3FF are free space.

At start the program shows the address where to write, through keys T1 and T2 the value in incremented or decremented.

Through key T3 the address is accepted, then the value to write is selected through T1 and T2, as last press key T3 to write.

Whenever a key is pressed, an acoustic signal is emitted.

After the operation is terminated the selected address and the written data are shown one after the other.

Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_LCD

This program allows to manage an alphanumeric LCD featuring a number rows and columns definable by User.

The display must be connected to CN5 following the connections shown in the diagram of K51-AVR page 4 of 4.

Before compiling select in menu Option/Compiler/Misc/ :

Byte End 5F, Register File REG51.DAT

In menu Option/ LCD select:

Db4 = P1.5 , Db5 = P1.6 , Db6 = P1.7 , Db7 = P1.2 , E = P1.4 , Rs = P1.3

 

x_PPI

This program shows, in hexadecimal format, the status of the eight lines connected to IC1 (PCF8547A9).

Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_PPO

This program activates sequentially one at a time all the 8 lines connected to IC1 (PCF8574A).

Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_PPO2

This program turns on in sequence the 16 TTL lines available on connector CN3.

Before compiling select in menu Option/Compiler/Misc/ :

Byte End 5F; Register File 8052.DAT

 

x_RTC

This program allows you to show the RTC or Real Time Clock on IC7 (PCF8583) to the four 7 segments displays: To set the RTC values keys T2 and T3 are used, in detail key T2 increments the hours and T3 increments the minutes.

Whenever one of the two keys is pressed the seconds are reset.

Key T1 switches between visualization of seconds and hours.

Whenever a key is pressed, an acoustic signal is emitted.

Date and eventual alarm are not managed: Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

x_TER

This program reads the temperature measured by IC3 (DS1621) and shows it in centigrade degreases with values ranging from -55 to +125.

Before compiling set in menu Option/Compiler/Misc: Byte End 5F; Register File 89c1051.DAT or 8052.DAT.

For use with 8xC51/52 modify the source where the pins used are described replacing pins for 89c1051 with pins for 8xc51.

 

BASCOM Examples for boards

KND_08 - KND_44 - KAD_08

 

 

bm65 bm66 bm67

 

KND_08

This program allows to manage the board resources of KND 08 card through a menu, using 2 TTL lines driven by a family 51 micro controller.

This program is managed through a RS 232 serial line, so it is essential to connect a free COM port of the PC to connector CN2 of K51-AVR.

To configure the BASCOM 8051 terminal in menu Options/Communication select the COM port and set Baud Rate to 19200, parity to none, data bits to 8, stop bits to 1.

The board used to drive KND 08 is K51-AVR, connections are:

K51-AVR ................ KND 08

L1 (pin4 CN6) ----> SC (pin2 CN1 KND08)

L2 (pin5 CN6) ----> SD (pin1 CN1 KND08)

Supply both the boards.

Before compiling in menu Option/Compiler/Misc set Byte End(Hex) = 60.

 

KND_44

This program allows to manage the board resources of KND 44 card through a menu, using 2 TTL lines driven by a family 51 micro controller.

This program is managed through a RS 232 serial line, so it is essential to connect a free COM port of the PC to connector CN2 of K51-AVR.

To configure the BASCOM 8051 terminal in menu Options/Communication select the COM port and set Baud Rate to 19200, parity to none, databits to 8, stopbits to 1.

The board used to drive KND 44 is K51-AVR, connections are.

K51-AVR .................. KND 44

L1 (pin4 CN6) ----> SC (pin2 CN1 KND44)

L2 (pin5 CN6) ----> SD (pin1 CN1 KND44)

Supply both the boards.

Before compiling in menu Option/Compiler/Misc set Byte End(Hex) = 60.

 

KAD_08

This program manages a sliding alphanumeric message on eight 14-segments displays, installed on KAD 08 board, through 2 TTL signals driveb by a micro controller of family 51.

The master board is K51-AVR which must be connected to KAD 08 as follows:

K51-AVR ........... KAD 08

L1 (pin4 CN6) ----> SC (pin2 CN1 KAD08)

L2 (pin5 CN6) ----> SD (pin1 CN1 KAD08)

Supply both the boards.

Before compiling in menu Option/Compiler/Misc set Byte End(Hex) = 70.

 

KAD_08_2

This program allows to manage the resources on the KAD 08 board through a menu and 2 TTL lines driven by a micro controller of the 51 family.

This program is controlled through the RS 232 serial line so it is essential to connect a free COM port on the PC to the connector CN2 of K51-AVR.

Configure the BASCOM 8051 terminal using menu Option/Communication, select the COM port and set baud rate to 19200, parity to none, data bits to 8 and stop bits to 1.

The master board is K51-AVR which must be connected to KAD 08 as follows:

K51-AVR ........... KAD 08

L1 (pin4 CN6) ----> SC (pin2 CN1 KAD08)

L2 (pin5 CN6) ----> SD (pin1 CN1 KAD08)

Supply both the boards.

Before compiling in menu Option/Compiler/Misc set Byte End(Hex) = 50.

 

 

EXAMPLEs

BASCOM-LT

for K51-AVR.

 

 

K51-AVR

DEMO_AD11, DEMO_AD4, DEMO_DA, DEMO_REE, DEMO_WEE, DEMO_LCD, DEMO_PPI, DEMO_PPI1, DEMO_PPO, DEMO_PPO1, DEMO_PPO2, DEMO_RTC, DEMO_TER,

 

BASCOM-LT Examples for boards

KND_08 - KND_44 - KAD_08

 

 

bm68 bm69 bm70

 

 

KND_08, KND_44, KAD_08

 

 

EXAMPLEs

BASCOM-8051

for K51-AVR..

 

 

K51-AVR

51_AD11, 51_AD4, 51_DA, 51_REE, 51_WEE, 51_PPI, 51_PPO, 51_RTC, 51_TER

 

GPC® F2

F2_AD11, F2_AD4, F2_DA, F2_REE, F2_WEE, F2_PPI, F2_PPO, F2_RTC, F2_TER

 

BASCOM-8051 Examples for boards

KND_08 - KND_44 - KAD_08

 

bm71 bm72 bm73

 

KND_08, KND_44, KAD_08, KAD_08_2

 

GPC® F2

F2_KND_08, F2_KND_44, F2_KAD_08, F2_KND_08_2

 

EXAMPLEs

BASCOM-AVR

for K51-AVR.

 

 

K51-AVR

DEMO_AD11, DEMO_AD4, DEMO_DA, DEMO_REE, DEMO_WEE, DEMO_PPI, DEMO_PPO, DEMO_RTC, DEMO_TER

 

BASCOM-AVR Examples for boards

KND_08 - KND_44 - KAD_08

 

bm74 bm75 bm76

 

 

KND_08, KND_44, KAD_08

 

Page up-dated at June 7st, 2000

 

GRIFO®

Via dell'Artigiano, 8/6

40016 San Giorgio di Piano

Bologna ITALY

 

Tel: +39 051 892.052 (4 lines)

FAX: +39 051 893.661

E-mail:

for commercial communications sales@grifo.it

for technical communications tech@grifo.it

for general communications grifo@grifo.it