-
Datei
DS18B20.txt
framesize = 40 Config Lcdpin = Pin , Db4 = Portb.5 , Db5 = Portb.4 , Db6 = Portb.3 , Db7 = Portb.2 , Rs = Portc.1 , E = Portc.0 Config Lcd = 16 * 2 Cursor Off Cls Config 1wire = Portc.5 Dim Ar(8) As Byte Dim W As Word Dim I As Byte Dim Ii As Byte Dim Wert_aus_ds1820 As Integer Dim Seriennummer As Byte Dim Eeprom
in „DS18B20 & ATxmega“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
regler_sensor.c
sei(); } return 0; } ISR(TIMER0_COMP_vect) { PORTA=~PORTA; //PWM Output } ISR(TIMER2_OVF_vect) { PORTC=~PORTC; //PORTC toggeln timer_count++; }
in „LCD Display funktioniert bei Zusammenstellung nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
STMC.asm
Modules inactive ; MOVLB 0xF MOVLW B'00000000' ;keiner z.Z. MOVWF PMD0 CLRF PORTA ; CLRF PORTB ; CLRF PORTC ; InitPortA MOVLW H'001' ;RA0= Ain MOVWF ANSELA ;RA7 to RA1 digital MOVLW B'10000001' ;Data direction "1"= Input / "0"= Output ; ; RA7= I 16MHz Pin-6 (9) ; RA6= O nu Pin-7 (10) ; RA5= O nu Pin-4 (7
in „PIC18F USART Problem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Lite11.asm
data to device io_write: ser uni00 ;ddrc=hi=out out ddrc,uni00 ;port_c:dir:out/function:data:out out portc,uni00 ;port_c:latch:hi ldi uni00,0b11010000 ;load adress null_device out portd,uni00 ;select null_device clr uni00 ;stabilize adress null_device/clear scratch_reg out portc,data ;send device data ser
in „Takt oder Beat aus Musik filtern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Lite11.asm
data to device io_write: ser uni00 ;ddrc=hi=out out ddrc,uni00 ;port_c:dir:out/function:data:out out portc,uni00 ;port_c:latch:hi ldi uni00,0b11010000 ;load adress null_device out portd,uni00 ;select null_device clr uni00 ;stabilize adress null_device/clear scratch_reg out portc,data ;send device data ser
in „stacksicherung bei 2 ints“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ATMege8515.txt
0x00 out DDRB, temp ;Datenrichtung von PortB Eingang ldi temp,0xFF out DDRC, temp ;Datenrichtung von PortC Ausgang ldi temp,0b00000100 ;Achtung 256 out TCCR0,temp ;Vorteiler = 1024 Timer0 ldi temp,CountValue ;Startwert des Timer 0 einstellen: out TCNT0, temp ldi temp, LOW(UBRRVAL) ;Baudrate einstellen out
in „Wie stark beeinfluss der UART den Zähler?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ATMege8515.txt
0x00 out DDRB, temp ;Datenrichtung von PortB Eingang ldi temp,0xFF out DDRC, temp ;Datenrichtung von PortC Ausgang ldi temp,CountValue ;Startwert des Timer 0 einstellen: out TCNT0, temp ldi temp, LOW(UBRRVAL) ;Baudrate einstellen out UBRRL, temp ldi temp, HIGH(UBRRVAL) ;Baudrate einstellen out UBRRH, temp
in „Wie stark beeinfluss der UART den Zähler?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Stopp-Uhr.asm
"m16def.inc" ;Definitionen für ATMega16 //rjmp main ;** ;** !!! Achtung bei ATMega 16 und LCD an PortC muß JTAG Bit aus sein ;** ;** //Für TimerOverflows ;** CPUTAKT = 4000000 ;** 1_byte = 256 ;** overfl = TAKT/1_byte ;** sekunden zwischen 2 Overflows = overflow/prescaler ;** prescaler: 1 ; 8 ; 64 ;
in „Bräuchte Hilfe! Finde meinen Fehler nicht!“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcdadc.c
**************FUNKTIONEN*****************************/ /*Programmschalterauswahl*/ int Px() { if (PORTC0==0) return(1); if (PORTC1==0) return(2); if (PORTC2==0) return(3); }//end Programmschalter /*Programm P1*/ void P1() char iiTemp[6], siTemp[6]; { if (iiTemp>=siTemp)PORTD6==stop; else PORTD6==start
in „Fehlermeldungen bei Funktionen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Schrittmotoransteuerung.c
PORTB = AUSGANG DDRD = 0b11111111; // Datenrichtung PORTD = AUSGANG DDRC &= ~(1<<4); // Taster 1 PORTC |= (1<<4); DDRC &= ~(1<<5); // Taster 2 PORTC |= (1<<5); initTimer(); // Timer1 Aufruf sei(); // alle Interruptquellen freigeben // -----------------------------------------------------------------
in „Kombination UART / TIMER“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DPasmfinale.asm
; 5x5 Matrix = 25 LEDs, eine LED pro PIN ; ; PORTA PIN 0-7 = Ausgabe ; PORTB PIN 0-7 = Ausgabe ; PORTC PIN 0-7 = Ausgabe ; PORTD PIN 7 = Ausgabe ; PORTD PIN 1-6 = evtl. Eingaben für Musterwahl per Taster ; PORTD PIN 0 = Eingabe - Signal ; Danke Jobst! :) ; *******************************************
in „Audiotisch (Daft Punk)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DPasmfinale.asm
Version ; 5x5 Matrix = 25 LEDs, eine LED pro PIN ; ; PORTA PA 0-7 = Ausgabe ; PORTB PB 0 = Ausgabe ; PORTC PC 0-7 = Ausgabe ; PORTD PD 0-7 = Ausgabe ; PORTB PB 1 = Eingabe - Signal ; PORTB PB 3-4 = evtl. Tasteransteuerung ohne Musikerkennung ; PORTB PB 5-7 = ISP only ; Danke Jobst! :) ; ****************
in „Audiotisch (Daft Punk)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
mmc_lib.c
smaller code)*/ static unsigned char cmd[6]; inline static void spi_send_byte(unsigned char data) { PORTC &= ~(1<<PC1); // bsync output low SPDR=data; loop_until_bit_is_set(SPSR, SPIF); // wait for byte transmitted... PORTC |= 1<<PC1; //bsync output high } static unsigned char send_cmd(void) { unsigned short i; spi_send_byte(0xFF); //Dummy delay 8 clocks //PORTC &= ~(1<<PC1); // output low MMC_PORT &= ~(1<<MMC_CS); //MMC Chip Select -> Low (activate) for (i=0; i<6; i++) {//Send 6 Bytes spi_send_byte(cmd[i]); } unsigned char result; for(i=0; i<128; i++) {//
in „mp3-Player mit Atmega8 und vs1011e spielt nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Stopuhr.txt
Timervorgabe = 220 ';Voreinstellung für 10ms Interrupt bei 3,6 kHZ ';LCD Anzeige definieren Config 1wire = Portc.5 ';Definieren ob Ein oder Ausgang '; 76543210 Ddrc = &B00100000 ';1 = Ausgang 0 = Eingang ';Ddrb = &B00011111 '1 = Ausgang 0 = Eingang ';Ddrc = &B00000000 '1 = Ausgang 0 = Eingang ';Pull Up's der verwendeten Eingänge aktivieren Portc.4 = 1 ' ; Taster "Start" Portc.5 = 1 ' ; TASTER "Stop " ';Interrupthandling für Timer 0 Enable Interrupts ';Interrupts global einschalten On Timer0 Ontimer0 ';Interrupt Routine für Timer0 overflow
in „Stoppuhr Programm“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Hp03.c
param speichern { param[i]=i2c_readAck(); } uart_puts(" param: "); intuart(param[3]); i2c_stop(); PORTC |=_BV(1); //Pin XCLR auf high uart_puts(" XCLR high "); //-------------Auslesen der Sensorwerte (Rohdaten)-------------------------------------------------------------------------------------------
in „Hp03 Berechnung läuft schief“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
sprintf(buf,"%d",variable); lcd_puts(buf); } int main(void) { _delay_ms(1250); Port_Initialize(); PORTC |= (1<<DCF77_PON); _delay_ms(250); PORTC &= ~(1<<DCF77_PON); lcd_init(LCD_DISP_ON); ADC_Voltage_Initialize(); ADC_Charge_Initialize(); //Timer_Initialize(); _delay_ms(500); Start_Clock(); sei(); // set I-flag in SREG while(1) { //if(PORTC & (1<<PC1)) ButtonPressed = !ButtonPressed; touren = spins / (60 * second); // U/min speed = (WheelPerimeter * 1000 * 60 * touren)/spins; // km/h drivenKm = speed * second * 3600; // km //if(!ButtonPressed
in „DCF auf INT0“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
mw_main.c
[i]); } } lcd_command(0x80); } char buf[20]; int main(void) { _delay_ms(1250); Port_Initialize(); PORTC |= (1<<DCF77_PON); _delay_ms(250); PORTC &= ~(1<<DCF77_PON); _delay_ms(250); lcd_init(LCD_DISP_ON); // ADC_Voltage_Initialize(); // ADC_Charge_Initialize(); //Timer_Initialize(); _delay_ms(500); Start_Clock(); sei(); // set I-flag in SREG while(1) { //if(PORTC & (1<<PC1)) ButtonPressed = !ButtonPressed; touren = spins / (60 * second); // U/min speed = (WheelPerimeter * 1000 * 60 * touren)/spins; // km/h drivenKm = speed * second * 3600; // km bool b = (PIND
in „DCF auf INT0“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.s
transfer AREA main, CODE, READONLY EXPORT __main EXPORT TIM2_IRQHandler ENTRY __main PROC ;Clock für PORTC Freischalten LDR r0, = RCC_APB2ENR MOV r1, #0x10 STR r1, [r0] ;PORTC PIN15 als Ausgang stzen LDR r0, = GPIOC_CRH LDR r1, = 0x44344444 STR r1, [r0] ;Timer 2 Interrupt freischalten LDR r0, = TIM2_DIER
in „STM32 ASM Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.s
transfer AREA main, CODE, READONLY EXPORT __main EXPORT TIM2_IRQHandler ENTRY __main PROC ;Clock für PORTC Freischalten LDR r0, = RCC_APB2ENR MOV r1, #0x10 STR r1, [r0] ;PORTC PIN15 als Ausgang stzen LDR r0, = GPIOC_CRH LDR r1, = 0x44344444 STR r1, [r0] ;Timer 2 Interrupt freischalten LDR r0, = TIM2_DIER
in „STM32 ASM Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m644def.inc
Pins bit 5 .equ PINB6 = 6 ; Port B Input Pins bit 6 .equ PINB7 = 7 ; Port B Input Pins bit 7 ; ***** PORTC ************************ ; PORTC - Port C Data Register .equ PORTC0 = 0 ; Port C Data Register bit 0 .equ PC0 = 0 ; For compatibility .equ PORTC1 = 1 ; Port C Data Register bit 1 .equ PC1 = 1 ; For compatibility .equ PORTC2 = 2 ; Port C Data Register bit 2 .equ PC2 = 2 ; For compatibility .equ PORTC3 = 3 ; Port C Data Register bit 3 .equ PC3 = 3 ; For compatibility .equ PORTC4 = 4 ; Port C Data Register bit 4 .equ PC4
in „AVR - Fehlermeldung beim Übersetzen von Assembler für ATmega644“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m644def.inc
Pins bit 5 .equ PINB6 = 6 ; Port B Input Pins bit 6 .equ PINB7 = 7 ; Port B Input Pins bit 7 ; ***** PORTC ************************ ; PORTC - Port C Data Register .equ PORTC0 = 0 ; Port C Data Register bit 0 .equ PC0 = 0 ; For compatibility .equ PORTC1 = 1 ; Port C Data Register bit 1 .equ PC1 = 1 ; For compatibility .equ PORTC2 = 2 ; Port C Data Register bit 2 .equ PC2 = 2 ; For compatibility .equ PORTC3 = 3 ; Port C Data Register bit 3 .equ PC3 = 3 ; For compatibility .equ PORTC4 = 4 ; Port C Data Register bit 4 .equ PC4
in „woher Registerdefinitionen für mega644?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m324PAdef.inc
Pins bit 5 .equ PINB6 = 6 ; Port B Input Pins bit 6 .equ PINB7 = 7 ; Port B Input Pins bit 7 ; ***** PORTC ************************ ; PORTC - Port C Data Register .equ PORTC0 = 0 ; Port C Data Register bit 0 .equ PC0 = 0 ; For compatibility .equ PORTC1 = 1 ; Port C Data Register bit 1 .equ PC1 = 1 ; For compatibility .equ PORTC2 = 2 ; Port C Data Register bit 2 .equ PC2 = 2 ; For compatibility .equ PORTC3 = 3 ; Port C Data Register bit 3 .equ PC3 = 3 ; For compatibility .equ PORTC4 = 4 ; Port C Data Register bit 4 .equ PC4
in „M324def.inc gesucht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m324Pdef.inc
Pins bit 5 .equ PINB6 = 6 ; Port B Input Pins bit 6 .equ PINB7 = 7 ; Port B Input Pins bit 7 ; ***** PORTC ************************ ; PORTC - Port C Data Register .equ PORTC0 = 0 ; Port C Data Register bit 0 .equ PC0 = 0 ; For compatibility .equ PORTC1 = 1 ; Port C Data Register bit 1 .equ PC1 = 1 ; For compatibility .equ PORTC2 = 2 ; Port C Data Register bit 2 .equ PC2 = 2 ; For compatibility .equ PORTC3 = 3 ; Port C Data Register bit 3 .equ PC3 = 3 ; For compatibility .equ PORTC4 = 4 ; Port C Data Register bit 4 .equ PC4
in „M324def.inc gesucht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m644Pdef.inc
Pins bit 5 .equ PINB6 = 6 ; Port B Input Pins bit 6 .equ PINB7 = 7 ; Port B Input Pins bit 7 ; ***** PORTC ************************ ; PORTC - Port C Data Register .equ PORTC0 = 0 ; Port C Data Register bit 0 .equ PC0 = 0 ; For compatibility .equ PORTC1 = 1 ; Port C Data Register bit 1 .equ PC1 = 1 ; For compatibility .equ PORTC2 = 2 ; Port C Data Register bit 2 .equ PC2 = 2 ; For compatibility .equ PORTC3 = 3 ; Port C Data Register bit 3 .equ PC3 = 3 ; For compatibility .equ PORTC4 = 4 ; Port C Data Register bit 4 .equ PC4
in „Peter Danneggers Bootloader (fastboot) für AVR-GCC-Toolchain“ · Projekte & Code ·
-
PDF
471D81B8d01.pdf
processing speed. Block Diagram Figure 1. Block Diagram XTAL1 RESET PC0 - PC6 PB0 - PB7 VCC XTAL2 PORTC DRIVERS/BUFFERS PORTB DRIVERS/BUFFERS PORTC DIGITAL INTERFACE PORTB DIGITAL INTERFACE GND MUX & ADC ADC INTERFACE TWI AGND AREF TIMERS/ PROGRAM STACK COUNTERS OSCILLATOR COUNTER POINTER PROGRAM INTERNAL
in „Motorregelung für Fußballroboter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SEND_TEST.asm
oldtaste,RAM_OLDTASTE lds device,RAM_DEVICE lds timeout,RAM_TIMEOUT ldi temp1,0xFF out PORTA,temp1 out PORTC,temp1 ldi temp1,0 out DDRA,temp1 out DDRC,temp1 ldi temp1,0x07 ; Alle restlichen Portpins als Pull-up-Eingang out PORTD,temp1 ; PD.3-7 als low-Ausgang com temp1 out DDRD,temp1 ldi temp1,0b11111010
in „Resetgrund herausfinden“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
GFXLCD.c
PORTB #define DDR_BACKLIGHT DDRB #define BIT_BACKLIGHT PB2 //#define LEDS_BOTTOM #define PORT_D0 PORTC #define PIN_D0 PINC #define DDR_D0 DDRC #define BIT_D0 PC1 #define PORT_D1 PORTD #define PIN_D1 PIND #define DDR_D1 DDRD #define BIT_D1 PD3 #define PORT_D2 PORTC #define PIN_D2 PINC #define DDR_D2
in „Display Wintek Pollin“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Universeller_FB_Empfaenger.bas
use 40 for the frame space Config Lcd = 40 * 2 'configure lcd screen Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E = Portc.2 , E2 = Portc.3 , Rs = Portc.0 Config Pinc.1 = Output Portc.1 = 0 Config Pind.7 = Output Portd.7 = 0 Dim Impuls_laenge As Word , Flanken_index
in „Denon IR Fernbedienung mit Bascom nutzen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
symbolliste.txt
TXB80 0 #define __FRACT_FBIT__ 15 #define BORF 2 #define CS00 0 #define CS01 1 #define CS02 2 #define PORTC0 PC0 #define PORTC1 PC1 #define PORTC2 PC2 #define PORTC3 PC3 #define PORTC4 PC4 #define PORTC5 PC5 #define PORTC6 PC6 #define CS10 0 #define CS11 1 #define CS12 2 #define PORTD0 PD0 #define PORTD1
in „Prüfen ob -Werror gesetzt (Preprocessor)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD.asm
-3: 4Bit datenleitungen ; ; ; Bit6: incircuit programming ; ; Bit7: incircuit programming ; ; ; ; PortC Bit 0-7: Keypad ; ; ; ; PortD Bit 0-7: LED ; ; #include <p16F887.inc> __CONFIG _CONFIG1, _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
in „2*20 LCD Panel (HD44780) mit PIC16F887, Initialisierungsproblem?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
dsploader1.c
Register ^= (1<<BitNo) #define XTAL 7372800 #define BAUD 38400 /* IDMA- und ADSP-Belegung: IAD[15..8] : PORTC : IO IAD[7..0] : PORTA : IO /IWR : PORTG.0 : O /IRD : PORTG.1 : O IAL : PORTG.2 : O /IS : PORTG.3 : O /RESET : PORTG.4 : O */ #define IDMA_DIR_DATAL DDRA #define IDMA_PORT_DATAL PORTA #define IDMA_PIN_DATAL PINA #define IDMA_DIR_DATAH DDRC #define IDMA_PORT_DATAH PORTC #define IDMA_PIN_DATAH PINC #define IDMA_PORT_nIWR PORTG #define IDMA_BIT_nIWR 0 #define IDMA_PORT_nIRD PORTG #define IDMA_BIT_nIRD 1 #define IDMA_PORT_IAL PORTG #define IDMA_BIT_IAL 2 #define IDMA_PORT_nIS
in „Auf ADSP-2185M via IDMA zugreifen“ · Digitale Signalverarbeitung / DSP / Machine Learning ·
-
Datei
main.asm
PinB0 - OUT = LED Bit0 ; PinB1 - OUT = LED Bit1 ; PinB2 - OUT = LED Bit2 ; PinB3 - OUT = LED Bit3 ; PORTC .equ PortC_Init = 0b00000000 ; PORTD .equ PortD_Init = 0b00000010 ; PinD0 - IN = RxD ; PinD1 - OUT = TxD .cseg ; Interrupt-Vektoren .org 0x0000 rjmp Start ;1 0x000(1) RESET External Pin, Power-on Reset
in „Mini-USB zu UART Konverter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
101219_16F883_Test05_EEORI.ASM
TRISB ;B1 ;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' BANKSEL PORTC ;B0 CLRF PORTC ;Init PORTC BANKSEL TRISC ;B1 movlw b'00000000' ;PortC lomplett als Ausgang MOVWF TRISC ;B1 ;----------------------------------- BANKSEL PORTA ;''''''''''''''''''''''''''''''' bis hier
in „16F882 EEPROM-Schreibfehler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
codeschloss.cpp
counter=0; main () { DDRD = 0xFF; // PORTD = Ausgang DDRB = 0x00; // PORTB = Eingang DDRC = 0x00; // PORTC = Eingang PORTB = 0xFF; // PORTB = PULL-UP PORTC = 0xFF; // PORTC = PULL-UP do { if (pw==false) { set_pw(); } enter_pw(); test_pw(); if (pw_true==true) { // cout<<"Passwort korrekt"<<endl; pw_true=
in „Was steht in Variable“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Test-io-16-1.cc
------------------------------------------------------------------- void init() { sbi(DDRC,0); // PORTC0 auf Ausgang twiInitMaster(0x40); // TWI Initialisierung mit der Addresse 0x40 da A0-2 auf 0 twiStart(); // TWI Start twiWriteByte(0x06,0); // TWI Port 0 twiWriteByte(0x00,0); // TWI Port auf Ausgang
in „i2c und MCP23016“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
; // Oscillator // Ports // only PC6 is used for RESET DDRC = 0x00; // adc -> set all to input // PORTC = 0x00; PORTC = 0x7F; // activate pull-ups for all PORTC // DDRB = 0x2F; DDRB = 0x01; // set all but PB0 (LED) to input, spi changes it later // PORTB = 0xFF-2; PORTB = 0xFF; // activate pull-ups and
in „NMEA wird nicht richtig empfangen (SkyTraq 6 ST22, ATmega8L)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Impulszaehler_Version2.c
Messungen_init (void) { // Ringbuffer initialisieren Ringbuffer._lesen = 0; Ringbuffer._schreiben = 0; // PortC konfigurieren DDRC &= (~PINC0_BIT & ~PINC1_BIT & ~PINC2_BIT & ~PINC3_BIT); // Pins C0-C3 sollen Eingaenge sein // PORTC |= PINC0_BIT | PINC1_BIT | PINC2_BIT | PINC3_BIT; // Alle internen PullUp-Widerstände einschalten PORTC &= (~PINC0_BIT & ~PINC1_BIT & ~PINC2_BIT & ~PINC3_BIT); // Alle internen PullUp-Widerstände ausschalten // PCINT0 initialisieren PCMSK1 |= PCINT8_BIT | PCINT9_BIT | PCINT10_BIT | PCINT11_BIT; // Interrupt
in „Bau eines S0-Impulszählers“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
EBike16_12.c
Zustand_Now = &Schalt_Zu[5]; nop(); Schalt_Next = 1; } break; } default: break; } nop(); if(!(PIND & 0x10)) PORTC = (Mask_I2Down & *Zustand_Now); else PORTC = (Mask_I2Up & *Zustand_Now); nop(); if (Inter_ZK == 1 && Inter_Count >= 10) chopper(); nop(); Inter_Count++; nop(); } } return 0; } //===================
in „Hilfe bei Atmega32 Initialisierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.s
transfer AREA main, CODE, READONLY EXPORT __main EXPORT TIM2_IRQHandler ENTRY __main PROC ;Clock für PORTC Freischalten LDR r0, = RCC_APB2ENR MOV r1, #0x10 STR r1, [r0] ;PORTC PIN15 als Ausgang stzen LDR r0, = GPIOC_CRH LDR r1, = 0x44344444 STR r1, [r0] ;Timer 2 Interrupt freischalten LDR r0, = TIM2_DIER
in „STM32 ASM Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
PB3, PB7, PC0: Eingänge 1a rechts, 1a links, 1a Spitze, aktiviere Pullups PORTB = _BV(3) | _BV(7); PORTC = _BV(0); } bool get_a(void) { bool a = PINB & _BV(3); // PB3 abfragen: 1a rechts return a; } bool get_b(void) { bool b = PINB & _BV(7); // PB7 abfragen: 1a links return b; } bool get_c(void) { bool
in „Vorstellung und erstes Projekt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
t6963c.h
*****************************************/ // ** #define glcd_wr_PIN 0 // ** #define glcd_wr_PORT PORTC // ** // ** #define glcd_rd_PIN 1 // ** #define glcd_rd_PORT PORTC // ** // ** #define glcd_ce_PIN 2 // ** #define glcd_ce_PORT PORTC // ** // ** #define glcd_cd_PIN 3 // ** #define glcd_cd_PORT PORTC // ** // ** #define glcd_rst_PIN 4 // ** #define glcd_rst_PORT PORTC // ** // ** #define glcd_fs_PIN 5 // ** #define glcd_fs_PORT PORTC // ** // ** #define glcd_rv_PIN 6 // ** #define glcd_rv_PORT PORTC // ** // ** #define glcd_DATA_PORT PORTA // ** #define glcd_DATA_PIN
-
Datei
CAN_ATMega-UVR-V5-1.bas
128 'Für LCDs mit 1 Controler Waitms 300 'WICHTIG! ggf. erhöhen Config Lcd = 16 * 2 Config Scl = Portc.0 Config Sda = Portc.1 '------------------------------------------------------------------------------- Config Adc = Single , Prescaler = Auto , Reference = Avcc 'Prescaler = 64 'Now Give Power To
-
Datei
MEGA328P_Minicomputer_BASIC.bas
256 On Ovf0 Tim0_isr Config Adc = Single , Prescaler = Auto , Reference = Internal_1.1 Start Adc Portc.0 = 1 Portc.1 = 1 Portc.2 = 1 Portc.3 = 1 Portc.4 = 1 Portc.5 = 1 Portd.4 = 0 Portd.5 = 0 Portd.6 = 0 Portd.7 = 0 Dim Temppin As Byte Dim Key(16) As Byte Dim Flanke(16) As Byte Dim Alternate As Byte
in „Minicomputer mit BASIC-Interpreter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
d; while(!(SPSR & (1<<SPIF))); received = SPDR; return received; } int main(void) { DDRC = 0xff; PORTC = 0x00; DDRB = 0xff; PORTB = 0x00; DDRB &= ~(1 << MOSI); DDRB |= (1 << SCK); DDRB |= (1 << MISO); PORTC &= ~_BV(RESET); // Reset auf GND legen PORTB &= ~_BV(SCK); // SCK auf LOW schalten delay_ms(100
in „programm in den speicher laden“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
d; while(!(SPSR & (1<<SPIF))); received = SPDR; return received; } int main(void) { DDRC = 0xff; PORTC = 0x00; DDRB = 0xff; PORTB = 0x00; DDRB &= ~(1 << MISO); DDRB |= (1 << SCK); DDRB |= (1 << MOSI); SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0); PORTC &= ~_BV(RESET); // Reset auf GND legen PORTB &= ~_BV(SCK
in „programm in den speicher laden“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.cpp
zaehlerstand = eeprom_read_dword(&zaehlerstand_eeprom); Clock_Init(); RTC_Init(); DMA_TX_ESP_init(); PORTC.DIRSET = PIN3_bm; // PC3 (TXD0) as output PORTC.DIRCLR = PIN2_bm; // PC2 (RXD0) as input PORTC.PIN2CTRL = PORT_OPC_PULLUP_gc; //PORTC.PIN3CTRL = PORT_OPC_PULLUP_gc; PORTD.PIN3CTRL = PORT_OPC_PULLUP_gc
in „Probleme mit dem DMA beim xMega32A4“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Encoder_V2.asm
ATMega32 ; SPH muss gesetzt werden ; URSEL muss auf 1 gesetzt werden (sonst nix serielle) ; Ausgabe auf PortC hinzugefügt (LED toggelt) ;******************************************************* ;.include "8515def.inc" .include "m32def.inc" ;.include "tn2313def.inc" .def Temp =r16 ; Temporary register .def Delay
-
Datei
Beispielcode.c
Out Func6=Out Func7=Out // State0=0 State1=0 State2=0 State3=0 State4=0 State5=0 State6=0 State7=0 PORTC=0x00; DDRC=0xFF; // Port D initialization // Func0=In Func1=In Func2=In Func3=In Func4=In Func5=In Func6=In Func7=In // State0=T State1=T State2=T State3=T State4=T State5=T State6=T State7=T PORTD
in „Hilfe bei C-Code ( Beginner )“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
Interrupts sperren (damit keiner dazwischenfunkt) //Ports konfigurieren (Ein-/Ausgänge) DDRC = 0x0f; // PORTC als AD-Eingang DDRB = 0xff; // PORTB = Output DDRD = 0xff; // PORTD: die oberen vier bit sind mit Zeilen des Displays verbunden PORTD = 0x0f; /*-----------------------------------------------------
in „Programmierung des Pingpong-Spiels von Franzis in C“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
freqgen48.bas
------- Config Portb.1 = Output Config Pinc.3 = Input Config Pinc.4 = Input Config Pinc.5 = Input Portc.3 = 1 Portc.4 = 1 Portc.5 = 1 '-------- Timer0 als PWM einrichten -------- Config Timer0 = Pwm , Prescale = 1 , Compare A Pwm = Clear Down , _ Compare B Pwm = Clear Down Enable Timer0 Start Timer0
in „Einstellbarer Frequenzgenerator für 0.12 Hz - 8 MHz mit Atmega 8 und Bascom“ · Projekte & Code ·