-
Datei
I2C_zubehoer.c
--------------------------------------------------------*/ void toggle_I2C(void) { if (bit_is_set(PORTC,PINC5)){ cbi(PORTC,PINC5); return; } if (bit_is_clear(PORTC,PINC5))sbi(PORTC,PINC5); } void toggle_I2C_2(void) { if (bit_is_set(PORTC,PINC4)){ cbi(PORTC,PINC4); return; } if (bit_is_clear(PORTC,PINC4))sbi(PORTC,PINC4); }
in „I²C Modifizierung 7-Bit --> 10-Bit“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
iom8535v.h
define PINC (*(volatile unsigned char *)0x33) #define DDRC (*(volatile unsigned char *)0x34) #define PORTC (*(volatile unsigned char *)0x35) /* Port B */ #define PINB (*(volatile unsigned char *)0x36) #define DDRB (*(volatile unsigned char *)0x37) #define PORTB (*(volatile unsigned char *)0x38) /* Port
in „kleines C-Problem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd.c
Befehl */ else set_rs(1); /* RS=1 => Zeichen */ wait_ms(waitcycles * 2); set_e(1); /* Hi byte */ PORTC &= 0x0F; PORTC |= (value & 0xf0); set_e(0); set_e(1); /* Lo byte */ PORTC &= 0x0F; PORTC |= ((value & 0x0F) * 0x10); set_e(0); } /* Wartezeit in Millisekunden bei fck = 8.000 MHz */ void wait_ms(int
in „Komisches Verhalten“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
termo.asm
movwf s_copy ; movf PCLATH, W movwf p_copy clrf PCLATH ; Bank 0 ; Intrupt servic routine Int_serv bsf PORTC, 2 ; Ziffer1 aus bsf PORTC, 1 ; Ziffer2 aus bsf PORTC, 0 ; Ziffer3 aus decf Digit,f ; Ziffernzähler verringern ;Digit=2: anzeigen Ziffer 3 1er ;Digit=1: anzeigen Ziffer 2 10er ;Digit=0: anzeigen Ziffer
in „Pic in AVR ändern?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AVR.H
DDB1 DDB0 63 .equ PINB,0x16 ; (0x36) PINB PINB7 PINB6 PINB5 PINB4 PINB3 PINB2 PINB1 PINB0 63 .equ PORTC,0x15 ; (0x35) PORTC PORTC6 PORTC5 PORTC4 PORTC3 PORTC2 PORTC1 PORTC0 63 .equ DDRC,0x14 ; (0x34) DDRC DDC6 DDC5 DDC4 DDC3 DDC2 DDC1 DDC0 63 .equ PINC,0x13 ; (0x33) PINC PINC6 PINC5 PINC4 PINC3 PINC2
in „Probleme mit rjmp beim AVR Atmega 8L“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „PIC - "beliebtester"?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Variablenwert(0/1) einem Ausgangspin zuordnen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
#define GLOFF PORTC&=~(1<<PC5)// Gleis links abschalten #define GMOFF PORTC&=~(1<<PC4)// Gleis links abschalten #define GROFF PORTB&=~(1<<PB1)// Gleis links abschalten #define GGOFF PORTB&=~(1<<PB0)// Gleis links abschalten
in „Flash Speicher sparen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Problem mit Befehl SET“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „"Syntaxbefehl" erstellen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit_lang.txt
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „sbit bei AVR“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Frage zu Struktur für IO-Port bei AVRs“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „LEDuhr Funktionen im Array speichern/abrufen AVR atmega16“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „AVR: Ausgang und Eingang?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „funktionen inlinen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Port-Pins global in C definieren?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Makros versus Funktionen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Tasten abfragen am ATTINY13 mit Assembler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Codingstyle vs Makros“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „arduino uno board mehrere ausgänge gleichzeitig“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Dumme Frage zum "C" mit AVR's“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „ATTINY 433MHz Fuchssender mit akustischem Grillen-Sound“ · Projekte & Code ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Basecom > C übersetzen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Bit im Register setzten ohne andere Bits zuverändern.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „LedMitMehrerenSchaltern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Soft I2C Master“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „LED1 OK. aber LED2 blinkt nicht mit voller Helligkeit“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Output Pins festlegen und verwenden (Anfänger)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Multiplexer Atmega 8“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Binär-Uhr Projekt Arduino“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „Lesen/Schreiben FRAM klappt nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
sbit.h
PIN_B5 SBIT( PINB, 5 ) #define PIN_B6 SBIT( PINB, 6 ) #define PIN_B7 SBIT( PINB, 7 ) #endif #ifdef PORTC #define PORT_C0 SBIT( PORTC, 0 ) #define PORT_C1 SBIT( PORTC, 1 ) #define PORT_C2 SBIT( PORTC, 2 ) #define PORT_C3 SBIT( PORTC, 3 ) #define PORT_C4 SBIT( PORTC, 4 ) #define PORT_C5 SBIT( PORTC, 5 ) #define PORT_C6 SBIT( PORTC, 6 ) #define PORT_C7 SBIT( PORTC, 7 ) #define DDR_C0 SBIT( DDRC, 0 ) #define DDR_C1 SBIT( DDRC, 1 ) #define DDR_C2 SBIT( DDRC, 2 ) #define DDR_C3 SBIT( DDRC, 3 ) #define DDR_C4 SBIT( DDRC, 4 ) #define
in „SW ATTiny85 Mag bitte jemand helfen?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
GY560Test.bas
$regfile = "m8def.dat" : $crystal = 4000000 Config Lcdpin = Pin , Rs = Portc.5 , E = Portd.0 , Db4 = Portc.0 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.3 Config Lcd = 16 * 2 Cls : Lcd "Test1234" End
in „ATmega8. Umbau als 2GHz Frequenz-Logger“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AvrStudio_asm.ini
PINB3 =IORegister PINB4 =IORegister PINB5 =IORegister PINB6 =IORegister PINB7 =IORegister ; ***** PORTC ************************ ; PORTC - Port C Data Register PC0 =IORegister PC1 =IORegister PC2 =IORegister PC3 =IORegister PC4 =IORegister PC5 =IORegister PC6 =IORegister PORTC0 =IORegister PORTC1 =IORegister PORTC2 =IORegister PORTC3 =IORegister PORTC4 =IORegister PORTC5 =IORegister PORTC6 =IORegister ; DDRC - Port C Data Direction Register DDC0 =IORegister DDC1 =IORegister DDC2 =IORegister DDC3 =IORegister
in „AVR Studio 4.11 + Synthax Highlighting“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m48def.inc
equ TIFR1 = $16 .equ TIFR0 = $15 .equ PORTD = $0B ; - PORTD - .equ DDRD = $0A .equ PIND = $09 .equ PORTC = $08 ; - PORTC - .equ DDRC = $07 .equ PINC = $06 .equ PORTB = $05 ; - PORTB - .equ DDRB = $04 .equ PINB = $03 ;***************************************************************************** ; Bit Definitions
in „.def.inc-Datei für AtMega48“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
LCD8DIGIT.pdf
PortB Bit1 = not used .equ PrtB0 = 0 ; PortB Bit0 = not used ; Port C connections: .equ PrtC7 = 7 ; PortC Bit7 = not used .equ DP = 6 ; PortC Bit6 = output store decimal point active low .equ ONE = 5 ; PortC Bit5 = output leading "one" digit .equ KILO = 4 ; PortC Bit4 = output "k"Hz digit .equ DB3 = 3 ; PortC Bit3 = output LCD-databus Bit 3 .equ DB2 = 2 ; PortC Bit2 = output LCD-databus Bit 2 .equ DB1 = 1 ; PortC Bit1 = output LCD-databus Bit 1 .equ DB0 = 0 ; PortC Bit0 = output LCD-databus Bit 0 ; Port
in „32Bit Division mit inline Assembler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
; PORTC = 0b00000000; /* configure PORTB */ DDRB = 0b00000000; PORTB = 0b00000000; /* configure PORTC */ DDRC = 0b00000111; PORTC = 0b00000000; set_sleep_mode( SLEEP_MODE_IDLE ); /* initialize and start ms
in „AVR ATmega168 - Probleme mit Interrupt bei UART Empfang“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
101213_16F883_EE_Test01.ASM
TRISB ;B1 ;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' BANKSEL PORTC ;B0 CLRF PORTC ;Init PORTC BANKSEL TRISC ;B1 movlw b'00000000' ;PortC Ausgang MOVWF TRISC ;B1 ZOut equ 20h VZZ equ 21H ZX1 equ 22H XFLAG equ 23H DATA_EE_ADDR equ 24h DATA_EE_DATA equ 25h ;---------
in „EEPROM PIC16F883 schreiben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
101213_16F883_EE_Test01.ASM
TRISB ;B1 ;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' BANKSEL PORTC ;B0 CLRF PORTC ;Init PORTC BANKSEL TRISC ;B1 movlw b'00000000' ;PortC Ausgang MOVWF TRISC ;B1 ZOut equ 20h VZZ equ 21H ZX1 equ 22H XFLAG equ 23H DATA_EE_ADDR equ 24h DATA_EE_DATA equ 25h ;---------
in „EEPROM PIC16F883 schreiben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd_4_bit.c
// RS auf 1 für Datenregister nibble_h = (data >> 4) & 0b00001111; nibble_l = data & 0b00001111; PORTC = nibble_h; lcd_enable(); delay_ms(6); PORTC = nibble_l; lcd_enable(); delay_ms(6); // Viel Sicherheit: Manche brauchen 40 us, andere 1,6ms } ///////////////////////////////////////////////////////
in „Problem mit LCD 4 Bit Initalisierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SPI_EEPROM_Write_Read_Alphabet.txt
NOPROT PORTB |= (1 << PB2); // CS high _delay_us(10); PORTB &= ~(1 << PB2); // CS low while(1) { PORTC |= (1 << PC5); // LED blinken _delay_ms(100); PORTC &= ~(1 << PC5); _delay_ms(100); // Schreibvorgang 1 //-------------------------------------------------------- SPI_MasterTransmit(0x06); // WREN
in „Speicherplatzadressierung SPI EEPROM“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
forum.c
resistor PORTB |= (1<<PB5); // turn on internal pull up resistor while(1) { //PC1 auf Masse ziehen PORTC |= 0b00001110; PORTC &= 0b11111101; //prüfen, ob PB 2,3,4 oder 5 einen Low-Pegel aufweisen if(!(PINB & (1<<PB2))) // When Button 1 pressed { delay_ms(120); number=1; screen(); } if(!(PINB & (1<<PB3
in „3x4 Tastenmatrix“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
tasten_matrix.c
resistor PORTB |= (1<<PB5); // turn on internal pull up resistor while(1) { //PC1 auf Masse ziehen PORTC |= 0b00001110; PORTC &= 0b11111101; //prüfen, ob PB 2,3,4 oder 5 einen Low-Pegel aufweisen if(!(PINB & (1<<PB2))) // When Button 1 pressed { delay_ms(120); number=1; screen(); } if(!(PINB & (1<<PB3
in „Tastenmatrix 3x4 Problem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
adc-lcd.bas
'$crystal = 16000000 Dim Waiting As Word Waiting = 0 Config Lcdpin = Pin , Db4 = Portd.2 , Db5 = Portc.4 , Db6 = Portc.3 , Db7 = Portc.2 , E = Portc.1 , Rs = Portc.0 Config Lcd = 16 * 2 Cursor Off Const Adc_multi = 0.0048828125 ' = 5.0 / 1024.0 CONFIG ADC = SINGLE, PRESCALER = AUTO, REFERENCE = AVCC
in „Temperatur Messung mit Mega8 und NTC-Widerstand 4,7k“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
LED_Thermometer.c
); // C is Output float temp = 0.0; while(1){ temp = therm_read_temperature(); if(temp <= 15.00){ PORTC |= (1<<PC0); //activates PC0 } else if(temp > 25.00 && temp < 25.0){ PORTC |= (1<<PC1); //activates PC1 } else if(temp >= 25.0){ PORTC |= (1<<PC2); //activates PC2 } //PORTC = 0x00;// deactivates PORTC
in „ATMega8 - LED-Thermometer (DS18S20)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd.c
font.h" //*** Hardwaredefinitionen *** // Matrix-Zeilen #define ROW_0_DDR DDRC #define ROW_0_PORT PORTC #define ROW_0 PC0 #define ROW_1_DDR DDRC #define ROW_1_PORT PORTC #define ROW_1 PC1 #define ROW_2_DDR DDRC #define ROW_2_PORT PORTC #define ROW_2 PC2 #define ROW_3_DDR DDRC #define ROW_3_PORT PORTC #define ROW_3 PC3 #define ROW_4_DDR DDRC #define ROW_4_PORT PORTC #define ROW_4 PC4 #define ROW_5_DDR DDRC #define ROW_5_PORT PORTC #define ROW_5 PC5 #define ROW_6_DDR DDRC #define ROW_6_PORT PORTC #define ROW_6 PC6 #define ROW_7_DDR DDRC #define ROW_7_PORT PORTC
in „avr register ausläsen und umwandeln zu ascii, wie?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
dmx_empfangTester.asm
ohne RS zu setzen cli push temp2 push temp1 mov temp2, temp1 swap temp1 andi temp1, 0b00001111 out PORTC, temp1 rcall lcd_enable andi temp2, 0b00001111 out PORTC, temp2 rcall lcd_enable rcall delay50us pop temp1 pop temp2 sei ret ;***** erzeugt den Enable-Puls ************************ lcd_enable: sbi PORTC, 5 ;Enable high nop ;3 Taktzyklen warten nop nop cbi PORTC, 5 ;Enable wieder low ret ;Und wieder zurück ;***** Pause nach jeder Übertragung ******************* delay50us: ;50us Pause push temp1 ldi
in „ATMEGA128: Resetsignal zwischen UART-Übertragung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
stdio.h> #include <avr/io.h> #include <avr/interrupt.h> #include <util/delay.h> int main() { cli(); PORTC.DIR=_BV(7); PORTC.OUT|=_BV(7); _delay_ms(500); PORTC.OUT^=_BV(7); _delay_ms(500); PORTC.OUT^=_BV(7); _delay_ms(500); /* corebug? */ asm volatile ( "loop%=: \n\t" " rjmp jump%= \n\t" " nop \n\t" " break
in „XMEGA Hardware-Bug (Kritisch)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
return 0; } SIGNAL(SIG_INTERRUPT1) { cli(); delay_ms(200); if (entl == 0){ displaystatus(2); entl=1; PORTC |= (1<<PC5); } else if (entl == 1) { if (car >= 2 ){ displaystatus(3); PORTC |= (1<<PC5); }else{ displaystatus(1); cbi(PORTC,PC5); } entl=0; } } SIGNAL(L1_INT) { lcd_gotoxy(0,0); lcd_puts("Licht 1
in „Interrupts machen mich irre... HILFEEEE!!! :-)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD.ASM
; Daten ausgeben ret ausgabe: out porta,temp1 ; Daten aus Register ausgeben sbi portc,E ; setzten BIT E nop ; kein Operation (warten) nop nop cbi portc,E ; lösche BIT E ret busyflag: clr temp2 ; lösche Register temp2 out ddra,temp2 ; Port A als Eingänge setzten cbi portc,RS ; lösche BIT RS sbi portd,RW ; setzte BIT RW wb1: sbi portc,E ; setzten BIT E nop ; keine Operation (warten) nop in temp2,pina ; lese Port A in Register temp2 ein cbi portc,E ; lösche BIT E nop sbrc temp2,Busy ; überspringe nächsten Befehl falls Busy flag rjmp
in „LCD 8 Bit Ansteuerung (AVR, Assembler)“ · Projekte & Code ·