9814372027

9814372027



C:\Program Files\MCS Electron»cs\BASCOM-AVR\SAMPLES\basmon.bas =iSlx)

Sub


Labę!


ii


’--------------------------- MCS Electronics---------------

'    BASMON.BAS

'regli ile must match the chip you use in your target system $regfile = "m8def.dat"

'crystal must match too $crystal = 8000000

'baudrate must match the baudrate of the terminal emulator $baud = 19200

1[variables]

Di» Krk As Byte

Di* Address As ¥ord

Di* Adrl As Byte , Adrh As Byte

Di* VI As Byte

'[main program]

Print "BASMON Version 1.01"

Do

Krk = ¥aitkey()

Krk = "T" Then Print Chr(13);

Elseif Krk = "W" Then Address = ¥aitkey()

VI = ¥aitkey()

Out Address , VI Print Chr(13);

Elseif Krk = "R" Then Address = ¥aitkey()

VI = Inp(address)

Print Chr(vl);

Elseif Krk = "0" Then Adrl = ¥aitkey()

Adrh = ¥aitkey()

VI = ¥aitkey()

Address = Adrh * 256 Address = Address + Adrl Out Address , VI Print Chr(13);

Elseif Krk = "?" Then Print

End If Loop


'command 1address 1 for new 1 va.lue


OUT comma


'check if it is 1 i t is working


id


attęiched


1wait for address 'wa.it for va.lue 'write value 'conf irm

'wait for address 'get value 'write back value


'wait for ISB of 'wait for MSB 'wait for data


ad


iress


'just echo for test


'for ever


U


A




Wyszukiwarka

Podobne podstrony:
K 113a Programator 89Cxx51 do BASCOMNowy Elektronik 113-KFirma MCS Electronics opracowała kompilator
BASCOM-AVR IDE - IS> X File Edit Program lools Options Window Helpd
BASCOM-AVR IDE File Edit Program Tools Options Window Helpp
BASCOM-AVR IDE File Edit Program Tools Options Window Helpd
Konf?scom BASCOM-AVR Options Cornpiler ] Communication j Environment
Rys. i. Zestaw ZL11AVR2. Środowisko BASCOM-AVR Mikroprocesory AVR będziemy programować przy użyciu
hot <$t HotDog Professional 4 - [C:PROGRAM FILESH0TD0G4HTMLFilesReadMe.html] J§i File Edit View i
ZSBD 3 C:Program FilesMicrosoft SQL ServerMSSQLLog SQL Server Enterprise Manager After you have crea
mp3compr1 MP3 Compressor
19ccw13 Ą Localion:
13-i 4. En Iśchant U secondes IT LE PROGRAMMATEUR DE CUISSON ELECTRONIC3UE1 II permet de programmer
aa C:WindowsSystem32cmd.exe d:UnitTestKalkulatorUnitTestNUnitinDebug>”C:Program Files
wygląd BibleWorks - [c: program files (x86) .bibleworks 8initw800.swc] C=) File View Search Tools R
split2 HJSplit 2.2File Split Input File C^Program FilesOpenOffice.org1.1.4 prograin4ypes.tdb Split
Screeny  7    ► Komputer ► Dysk lokalny (E:) ► Program Files ► Aplikacje na E ► Kur
Screeny  ► Komputer ► Dysk Ickaliy. E:    ► Program Files ► — plikacje na E ► Kurs

więcej podobnych podstron