DISABLE/de

(Difference between revisions)
Jump to: navigation, search
(Remarks)
(Anmerkungen)
Line 149: Line 149:
 
 
 
 
  
[[File:Notice.jpg|left|Notice.jpg]] Um JTAG zu sperren kann man DISABLED JTAG schreiben. JTAG ist kein interrupt sondern ein Device.
+
[[File:Notice.jpg|left|Notice.jpg]] Um JTAG zu sperren kann man DISABLED JTAG schreiben. JTAG ist kein Interrupt sondern ein Device.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>

Revision as of 00:43, 12 March 2013

Contents

Funktion

Sperrt den angegebenen Interrupt.

 

 

Syntax

DISABLE interrupt [device]

 

 

Anmerkungen

Interrupt

Beschreibung

INT0

Externer Interrupt 0

INT1

Externer Interrupt 1

OVF0,TIMER0, COUNTER0

TIMER0 Überlauf Interrupt

OVF1,TIMER1,

 

COUNTER1

TIMER1 Überlauf Interrupt

CAPTURE1, ICP1

INPUT CAPTURE TIMER1 Interrupt

COMPARE1A,OC1A

TIMER1 OUTPUT COMPARE A Interrupt

COMPARE1B,OC1B

TIMER1 OUTPUT COMPARE B Interrupt

SPI

SPI Interrupt

URXC

Serial RX complete Interrupt

UDRE

Serial data register empty Interrupt

UTXC

Serial TX complete Interrupt

SERIAL

Sperrt URXC, UDRE und UTXC

ACI

Analog comparator Interrupt

ADC

Analog/Digital Converter Interrupt

 

Standardmäßig sind alle Interrupts gesperrt (disabled).

Um ALLE Interrupts zu sperren geben Sie INTERRUPTS an.

 

Um das Freigeben und Sperren einzelner Interrupts zu ermöglichen geben Sie ENABLE INTERRUPTS an.

Das ENABLE INTERRUPTS funktioniert wie ein Hauptschalter. Es muss enabled/gesetzt sein um das Funktionieren einzelner Interrupts zu ermöglichen.

 

Es ist anhängig vom Mikrocontroller welche Interrupts verfügbar sind. Die verfügbaren Interrupts werden automatisch im BASCOM-Editor angezeigt.

 

 

Notice.jpg
 Um JTAG zu sperren kann man DISABLED JTAG schreiben. JTAG ist kein Interrupt sondern ein Device.

 

 

Siehe auch

ENABLE

 

 

Example


'-----------------------------------------------------------------------------------------
'name : serint.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : serial interrupt example for AVR
'micro : 90S8535
'suited for demo : yes
'commercial addon needed : no
'-----------------------------------------------------------------------------------------
 
$regfile = "8535def.dat" ' specify the used micro
$crystal = 4000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
Const Cmaxchar = 20 'number of characters
 
Dim B As Bit 'a flag for signalling a received character
Dim Bc As Byte 'byte counter
Dim Buf As String * Cmaxchar 'serial buffer
Dim D As Byte
 
'Buf = Space(20)
'unremark line above for the MID() function in the ISR
'we need to fill the buffer with spaces otherwise it will contain garbage
 
Print "Start"
 
On Urxc Rec_isr 'define serial receive ISR
Enable Urxc 'enable receive isr
 
 
 
Enable Interrupts 'enable interrupts to occur
 
Do
If B = 1 Then 'we received something
 Disable Serial
 Print Buf 'print buffer
 Print Bc 'print character counter
 
 
 'now check for buffer full
 If Bc = Cmaxchar Then 'buffer full
 Buf = "" 'clear
 Bc = 0 'rest character counter
 End If
 
 Reset B 'reset receive flag
 Enable Serial
End If
Loop
 
Rec_isr:
Print "*"
If Bc < Cmaxchar Then 'does it fit into the buffer?
 Incr Bc 'increase buffer counter
 
 
 If Udr = 13 Then 'return?
 Buf = Buf + Chr(0)
 Bc = Cmaxchar
 Else
 Buf = Buf + Chr(udr) 'add to buffer
 End If
 
 
 ' Mid(buf , Bc , 1) = Udr
 'unremark line above and remark the line with Chr() to place
 'the character into a certain position
 'B = 1 'set flag
End If
B = 1 'set flag
Return

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language