'#=========================================================================== '# UU UU LL RRRRR II CCCCC HH HH CCCCCCC (c) 2008 '# UU UU LL RR RR II CC HH HH CCC '# UU UU LL RRRRR II CC HHHHHH CC Christian Ulrich (UlrichC) '# UU UU LL RR RR II CC HH HH CC URL:http://www.UlrichC.de '# UU UU LL RR RR II CC HH HH CCC '# UUU LLLLLL RR RR II CCCCC HH HH CCCCCCC eMail:Info@UlrichC.de '#=========================================================================== '# CU-TEMPLATE (MC-Source) alias cu-template(someone).bas Version 0.01 '#--------------------------------------------------------------------------- '# COPYRIGHTS '# This source code of http://www.ulrichc.de/ is licensed under the GNU/GPL '# '# You can redistribute it and/or modify it under the terms of the '# GNU General Public License as published by the Free Software Foundation; '# either version 2 of the License, or (at your option) any later version. '# See http://www.gnu.org/ '# '# Author:Christian Ulrich,(Germany)76448 Durmersheim Lk Rastatt,06.05.2008 '#--------------------------------------------------------------------------- '#--------------------------------------------------------------------------- '# NOTE '#--------------------------------------------------------------------------- '# Dieses Programm beschreibt ... '# Die Source basiert auf BASCOM Basic. '#--------------------------------------------------------------------------- '# This program describes ... '# The source is based on BASCOM Basic. '#--------------------------------------------------------------------------- '=================================================================================== 'CONTROLLER HW SETTINGS '=================================================================================== '$regfile = "m8def.dat" 'AVR Mega 8 '$regfile = "m16def.dat" 'AVR Mega 16 $regfile = "m32def.dat" 'AVR Mega 32 $framesize = 32 'Stack '$framesize = 68 '$framesize = 82 '$framesize = 128 '$swstack = 32 'Software Stack '$swstack = 68 '$swstack = 82 '$swstack = 128 $hwstack = 32 'Hardware Stack '$hwstack = 62 '$hwstack = 82 '$hwstack = 128 'CRYSTAL '--------------------- '$crystal = 1000000 'Quarzfrequence 1 Mhz (internal crystal) '$crystal = 4000000 'Quarzfrequence 4 Mhz '$crystal = 8000000 'Quarzfrequence 8 Mhz $crystal = 14318180 'Quarzfrequence 14.31818 Mhz '$crystal = 16000000 'Quarzfrequence 16 Mhz '=================================================================================== 'Programm Config '=================================================================================== '=================================================================================== 'Declarations Subs/Functions '=================================================================================== '=================================================================================== 'CONTROLLER PIN SETTINGS AND GLOBAL VARS '=================================================================================== Config PinD.7 = Output 'LED (on/off) LED1Switch Alias PortD.7 'alias Dim _led1Power as Bit _led1Power = 0 Config PinC.6 = Output 'Beep (on/off) Beep2Switch Alias PortC.6 'alias Dim _beep2Power as Bit _beep2Power = 0 '================================================================= ' Programm '================================================================= Do 'MAINLOOP _led1Power = not _led1Power 'toogle LED 1 LED1Switch = _led1Power 'switch LED 1 _beep2Power = not _beep2Power 'toogle BEEP 1 Beep2Switch = _beep2Power 'switch BEEP 1 wait 1 Loop 'END MAINLOOP End 'END PROGRAM '=================================================================================== 'FUNCTIONS/SUBS '===================================================================================
News Blog:
Gerade online:3 - Heute insgesamt:352