-
Datei
Seriell_mit_Nokiua_7110.bas
config Pind.6 = input 'taste mitte config pinb.0 = input config Pinc.5 = input 'Ladegrät Alarm config Portc.4 = output config Portc.3 = output config Portc.2 = output config pinc.0 = input portc.0 = 1 'taste rechts portd.7 = 1 portd.6 = 1 portb.0 = 1 portc.1 = 0 'pullup alarmausgang portc.5 = 1 rot alias portc.4 gemi alias portc.3 gere alias portc.2 rot = 0 gemi = 0 gere = 0 Config Serialin = Buffered , Size = 40 ' Konfig. der ser. Eingabe Enable Interrupts For n = 1 to 10 lami = 1 waitms 50 lami = 0 waitms
in „???SMS vom Computer über Handy schreiben????“ · Softwareentwicklung ·
-
Datei
interrupt2.c
sei (); //Interrupts einschalten while (1) { //Whileschleife starten //Unterbrechbarer Code PORTC &= ~_BV (PC4) ; //PC4 aus PORTC |= _BV (PC5) ; //PC5 an _delay_ms (500); //500ms warten PORTC &= ~_BV (PC5) ; //PC5 aus PORTC |= _BV (PC4) ; //PC4 an _delay_ms (500); //500ms warten } } ISR(INT0_vect) //Interrupt Service Routine starten { PORTC |= _BV (PC2); //PC2 einschalten _delay_ms(1000); //1000ms warten PORTC &= ~(1<<PC2); //PC2 ausschalten }
in „interrupt - Anfänger“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Handy_main.c
==0) { sms_auslesen=0; Status=1; y=0; } weiter: y=y; } } if (Heizung==1) //Heizung LED schalten { PORTC |= (1<<PC0); PORTC |= (1<<PC5); } else { PORTC&=~(1<<PC0); PORTC&=~(1<<PC5); } if (Status==1) //Error LED schalten PORTC |= (1<<PC1); else PORTC&=~(1<<PC1); if (Error==1) { if (Heizung==0) { _delay_ms
in „Problem beim senden mit printf“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
t6963c.c
DDRC|=(1<<0); PORTC&=~(1<<0); // /WR=0 _delay_ms(5); PORTC|=(1<<0); // /WR=1 } //数据自动写入函数 void writeauto(uchar onedata) { st3(); DDRC|=(1<<3); PORTC&=~(1<<3); // C/D=0,数据通道 DDRL=0xff; //A口方向为输出 PORTL=onedata; //送数据到A口寄存器 DDRC|=(1<<0); PORTC&=~(1<<0); // /WR=0 PORTC|=(1<<0); // /WR=1 _delay_ms(5); PORTC|=(1<<0); // /WR=1 } //一字节参数指令写入函数 void oneparameter(uchar onep1,uchar comd1) { writedata(onep1); writecode(comd1); } //两字节参数指令写入函数 void
in „T6963C - Steuerung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
uint8_t speed) //Geschwindigkeit rechter Motor { OCR1AL = speed; } void M1_CW(void) //Uhrzeigersinn { PORTC |= (1<<PC6); // Port C, Pin 6 auf high PORTC &= ~(1<<PC7); // Port C, Pin 7 auf low } void M1_CCW(void) // gegen den Uhrzeiger { PORTC &= ~(1<<PC6); PORTC |= (1<<PC7); } void M1_STOP(void) //aus { OCR1BL = 0; PORTC &= ~(1<<PC6); PORTC &= ~(1<<PC7); } void M2_CW(void) //mit dem Uhrzeiger { PORTB |= (1<<PB0); PORTB &= ~(1<<PB1); } void M2_CCW(void) // gegen den Uhrzeiger { PORTB &= ~(1<<PB0); PORTB |= (1<<PB1);
in „AT-Mega32/H-Brücke L293DNE/RN-Control1.4“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
8x2_lcd_clock.asm
equ d'5' ; PORTA c_led equ d'0' ; PORTA ; 74164 serial to parallel register c_lcd_cmdata equ d'3' ; PORTC c_sr_data equ d'1' ; PORTC c_sr_clk equ d'2' ; PORTC ; 2048 bit EEPROM 24AA02 c_EE_dat equ d'5' ; PORTC c_EE_clk equ d'0' ; PORTC ; keys c_key2port equ d'4' ; PORTC c_key1port equ d'3' ; PORTA c_init_trisa
in „Der totale Anfänger - auf der Suche nach einem Mikrokontroller“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD_Sourcecode.txt
sind der 4-Bit Databus von/zum LCD // Diese werden von der Routine angesprochen #define LCD_set_e() (PORTC |= (1<<PC7)) #define LCD_clr_e() (PORTC &= ~(1<<PC7)) #define LCD_set_rs() (PORTC |= (1<<PC5)) #define LCD_clr_rs() (PORTC &= ~(1<<PC5)) #define LCD_set_rw() (PORTC |= (1<<PC4)) #define LCD_clr_rw(
in „Verständnissproblem LCD 4-Bit Mode“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCDtext.asm
lcd_busy ;sonst noch ne runde ret ; lcd_write: cbi portc,rw ;schreibmodus ein out porta,daten ;daten aufn bus sbi portc,en ;enable high nop ;warten cbi portc,en ;enable low ret lcd_read: cbi portc,rs ;befehlsmodus ein sbi portc,rw ;lesen out ddra,leer ;port a->eingang sbi portc,en ;enable high nop ;warten cbi portc,en ;enable low in akku,pina ;daten holen out ddra,voll ;port a->ausgang cbi portc,rw ;lesen ende ret .dseg zeiger: .byte 2 text: .byte 26
in „lcd-trouble, die 100ste“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
PROJECT.H
.2 E // PORTA.3 MCLR-Funktion (=1 immer) // PORTA.4 Quarzanschluss // PORTA.5 Quarzanschluss // // PORTC.0 DB4 // PORTC.1 DB5 // PORTC.2 DB6 // PORTC.3 DB7 // = BUSY-Flag // PORTC.4 RS // PORTC.5 R/W #ifndef __PROJECT #define __PROJECT // Device: #pragma chip PIC16F676 // LCD_Daten Leitung (Extra-Name) #define BUSY PORTC.3 // LCD-Steueranschlusse #define E PORTA.2 // =1 -> LCD beschreiben/auslesen #define RS PORTC.4 // =1 -> Zeichen; =0 -> Befehl #define RW PORTC.5 // =0 -> zum LCD schreiben; =1 -> von LCD lesen //
in „PIC16F676 LCD_Init“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
Schaltung.pdf
Drehgeber A INT2 ;PORTB, 3 ;PWM1 ;PORTB, 4 ;PWM2 ;PORTB, 5 ;ISP ;PORTB, 6 ;PWM5,ISP ;PORTB, 7 ;ISP ;PORTC, 0 ;zumTreiber H-Bruecke 2 ;PORTC, 1 ;Impuls- Ausgabe - 1 pro Schrittweite für externeTreiber Port B0, C0, D4, D5 sind für eine andere Ansteuerung ;PORTC, 2 ;JTAG ;PORTC, 3 ;JTAG einer H-Brücke vom 2-Phasen Motor vorbereitet. ;PORTC, 4 ;JTAG ;PORTC, 5 ;JTAG ;PORTC, 6 ;Ausgang Richtung ;PORTC, 7 ;Ausgang Daten stoppen ;PORTD, 0 ;RX Serielle Schnittstelle ;PORTD, 1 ;TX Serielle Schnittstelle ;PORTD, 2 ;Externer EingangTakt Motor
in „Spielerei mit einem 2- und 5-Phasen-Schrittmotor“ · Projekte & Code ·
-
Datei
display_.c
Data Bit 6 (PC5) #define LCD_D7 PIN4_bm // Data Bit 7 (PC4) // Helper macros #define LCD_E_HIGH() (PORTC.OUTSET = LCD_E) #define LCD_E_LOW() (PORTC.OUTCLR = LCD_E) #define LCD_RS_HIGH() (PORTC.OUTSET = LCD_RS) #define LCD_RS_LOW() (PORTC.OUTCLR = LCD_RS) // Function Prototypes void lcd_send_nibble(uint8
in „EADOGM162W-A-Anzeige mit XMEGA“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
HD44780.c
Data Bit 6 (PC5) #define LCD_D7 PIN4_bm // Data Bit 7 (PC4) // Helper macros #define LCD_E_HIGH() (PORTC.OUTSET = LCD_E) #define LCD_E_LOW() (PORTC.OUTCLR = LCD_E) #define LCD_RS_HIGH() (PORTC.OUTSET = LCD_RS) #define LCD_RS_LOW() (PORTC.OUTCLR = LCD_RS) // Function Prototypes void lcd_send_nibble(uint8
in „EADOGM162W-A-Anzeige mit XMEGA“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DCF4.asm
;Nibbel tauschen lcd_3: mov temp, lcdtmp andi temp, 0b11110000 out portc,temp ;unteres Nibbel ausgeben cbi portc,2 ;E = 0 = Daten übernehmen(LCD-low-Nibbel) T1: in temp,TIFR ;weiter erst wenn TOV0 = 1 tst temp breq T1 ;sonst zurück->T1 sbi portc,2 ;E = 1 out tifr,temp ;
in „DCF-Uhr auf LCD mit AVR Control“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.bas
Chipstellen Config Scl = Portd.6 Config Sda = Portd.3 Config I2cdelay = 100 Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E = Portc.2 , Rs = Portc.0 Config Lcd = 40 * 2 'configure lcd screen Config Portc = Output 'configure portc as output Reset Portc.1 'write mode for
in „FM1216/PH/HM Ansteuerung“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
Schaltung2.pdf
Drehgeber A INT2 ;PORTB, 3 ;PWM1 ;PORTB, 4 ;PWM2 ;PORTB, 5 ;ISP ;PORTB, 6 ;PWM5,ISP ;PORTB, 7 ;ISP ;PORTC, 0 ;zumTreiber H-Bruecke 2 ;PORTC, 1 ;Impuls- Ausgabe - 1 pro Schrittweite für externeTreiber Port B0, C0, D4, D5 sind für eine andere Ansteuerung ;PORTC, 2 ;JTAG einer H-Brücke vom 2-Phasen Motor vorbereitet. ;PORTC, 3 ;JTAG ;PORTC, 4 ;JTAG ;PORTC, 5 ;JTAG ;PORTC, 6 ;Ausgang Richtung ;PORTC, 7 ;Ausgang Daten stoppen ;PORTD, 0 ;RX Serielle Schnittstelle ;PORTD, 1 ;TX Serielle Schnittstelle ;PORTD, 2 ;Externer EingangTakt
in „Spielerei mit einem 2- und 5-Phasen-Schrittmotor“ · Projekte & Code ·
-
Datei
lcd.c
// Ausgabe des /CS-Signals an den/die Chip(s) if (ID==1) PORTC.6=0; // CS3310 #1 wird angesteuert if (ID==2) PORTC.5=0; // CS3310 #2 wird angesteuert if (ID==3) PORTC.4=0; // CS3310 #3 wird angesteuert if (ID==4) PORTC.3=0; // CS3310 #4 wird angesteuert PORTC.1
in „Probleme mit Touch-Panal und RS232“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
display.bas
Portf.2 Config Portf.1 = Output _db2 Alias Portf.1 Config Portf.0 = Output _db3 Alias Portf.0 Config Portc.7 = Output _db4 Alias Portc.7 Config Portc.6 = Output _db5 Alias Portc.6 Config Portc.5 = Output _db6 Alias Portc.5 Config Portc.4 = Output _db7 Alias Portc.4 Config Portc.3 = Output _db8 Alias Portc.3 Config Portc.2 = Output _db9 Alias Portc.2 Config Portc.1 = Output _db10 Alias Portc.1 Config Portc.0 = Output _db11 Alias Portc.0 Config Porta.7 = Output _db12 Alias Porta.7 Config Porta.6 = Output _db13 Alias
in „Atmega128 + SD Card + 3.5" Display“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Alarmanlage.c
(char zeichen); } PORTC=0xFD; taste=PORTC; if(taste!=0xFD) { switch(taste) { case 0xEB: zeichen = '3'; break; case 0xDB: zeichen = '6'; break; case 0xBB: zeichen = '9'; break; case 0x7B: zeichen = 'B'; break; } void Code_Eingabe(char zeichen); } PORTC=0xFE; taste=PORTC; if(taste!=0xFE) { switch(taste) { case 0xE7: zeichen = 'F'; break; case 0xD7: zeichen = 'E'; break; case 0xB7: zeichen = 'D'; break; case 0x77: zeichen = 'C'; break; } void Code_Eingabe
in „Problem mit Tastatur für Codeeingabe bei Alarmanlage“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
RGBSteuerung.c
Interrupt einschalten sei(); while(1) { if (teiler == 0) { teiler = 255; PORTA = 0x00; PORTB = 0x00; PORTC = 0x00; PORTD = 0x00; }else{ // Strip 1 if (teiler == 255){PORTC |= (1<<PC0);} if (teiler == 0){PORTC |= (1<<PC1);} if (teiler == 200){PORTC |= (1<<PC2);} // Strip 2 if (teiler == 0){PORTC |= (1<<PC3);} if (teiler == 0){PORTC |= (1<<PC4);} if (teiler == 1){PORTC |= (1<<PC5);} // Strip 3 if (teiler == 1){PORTC |= (1<<PC6);} if (teiler == 1){PORTC |= (1<<PC7);} if (teiler == 1){PORTA |= (1<<PA7);} // Strip 4 if (teiler ==
in „Vairable wird nicht beachtet“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
drehzahl_II.c
Kurzer Funktionstest der LED's und Summers { for (unsigned char i=0; i<3; i++) { unsigned char k=80; PORTC |= (1<<PC6); PORTC |= (1<<PC7); sound(); _delay_ms(k); PORTC &= ~(1<<PC6); PORTC &= ~(1<<PC7); _delay_ms(k); } } int sound(void) //Piezosummer mit 3,2 kHz getaktet { for (unsigned char s=0; s < 40;
in „ATMEGA 164 A Variabel wird nicht im Interrupt beschrieben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
RGB_RAHMEN.c
nicht mehr ausgeführt // //case 2: //{ //PORTA = poti; //PORTC = poti; //_delay_ms(250); //PORTA = 0x00; //PORTC = 0x00; //_delay_ms(250); //} //break; //case 3: //{ //PORTA = poti; //PORTC = poti; //_delay_ms(500); //PORTA = 0x00; //PORTC = 0x00; //_delay_ms(
in „RGB über Timer die Farben wechseln lassen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
smc800.h
nicht über 5kHz zu kommen freq = true; //freq-Flag auf true setzen (wird von Timer zurückgesetzt) PORTC &= ~(1<<PORTC0); // Löscht STROBE for (int i=0;i<=10;i++) //kurz warten, damit die Platine den Pegelwechsel wahrnimmt { //for (int q=0;q<=10000;q++) //Warteschleife zu Debugzwecken, wenn an, umbedingt überprüfung auf freq ausschalten!! asm("NOP"); } PORTC |= (1<<PORTC0); // Setzt STROBE (Positive Flanke -> Daten werden übernommen) } void mot_tick(char motor,bool richtung) //Motor einen Schritt laufen lassen /0 = links/1 = rechts { //Interrupts MÜSSEN
-
Datei
Regen3.asm
....... p2: cbi portc,1 ;Ausgang für rcall time500ms ;500mS aktiv, Pumpe 1 ein sbi portc,1 ;rcall tx1 ;Sender f. Quittung tasten rjmp end_irq ;................................. Pumpe 3 ein ..................................... p3: cbi portc,2 ;Ausgang für rcall time500ms ;500mS aktiv, Pumpe 1 ein sbi portc,2 ;rcall tx1 ;Sender f. Quittung tasten rjmp end_irq ;................................. Pumpen aus ...............................
-
Datei
freqgen1.bas
Display initialisieren 'Fuer Lochrasterplatine - weniger Kreuzungen: Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.0 , E = Portc.3 , Rs = Portc.5 'Wie im Schaltplan: 'Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0 Config Lcd = 16 * 2 Cursor Off '--------- Tasteneingaenge High schalten Portd.2 = 1 Portd.3 = 1 '-------- Vars Dim Overflows As Word Dim Timer0count As Word Dim Flags As Byte Dim Tastcount As Word
in „Einstellbarer Frequenzgenerator für 0.12 Hz - 8 MHz mit Atmega 8 und Bascom“ · Projekte & Code ·
-
Datei
32atmega_freqgen1_org1.bas
Display initialisieren 'Fuer Lochrasterplatine - weniger Kreuzungen: 'Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.0 , E = Portc.3 , Rs = Portc.5 'Wie im Schaltplan: Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0 Config Lcd = 16 * 2 Cursor Off '--------- Tasteneingaenge High schalten Portd.2 = 1 Portd.3 = 1 '-------- Vars Dim Overflows As Word Dim Timer0count As Word Dim Flags As Byte Dim Tastcount As Word
in „Einstellbarer Frequenzgenerator für 0.12 Hz - 8 MHz mit Atmega 8 und Bascom“ · Projekte & Code ·
-
Datei
Freqgen-M8-Ver3.0_08-01-2012.bas
Display initialisieren 'Fuer Lochrasterplatine - weniger Kreuzungen: 'Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.0 , E = Portc.3 , Rs = Portc.5 'Wie im Schaltplan: Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0 Config Lcd = 16 * 2 Cursor On '--------- Tasteneingaenge High schalten Portd.2 = 1 Portd.3 = 1 '-------- Vars Dim Overflows As Word Dim Timer0count As Word Dim Flags As Byte Dim Tastcount As Word
in „Einstellbarer Frequenzgenerator für 0.12 Hz - 8 MHz mit Atmega 8 und Bascom“ · Projekte & Code ·
-
Datei
freqgen1.bas
Display initialisieren 'Fuer Lochrasterplatine - weniger Kreuzungen: Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.0 , E = Portc.3 , Rs = Portc.5 'Wie im Schaltplan: 'Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0 Config Lcd = 16 * 2 Cursor Off '--------- Tasteneingaenge High schalten Portd.2 = 1 Portd.3 = 1 '-------- Vars Dim Overflows As Word Dim Timer0count As Word Dim Flags As Byte Dim Tastcount As Word
in „Einstellbarer Frequenzgenerator für 0.12 Hz - 8 MHz mit Atmega 8 und Bascom“ · Projekte & Code ·
-
Datei
freqgen1_DISPL_MOD_03.bas
Display initialisieren 'Fuer Lochrasterplatine - weniger Kreuzungen: 'Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.1 , Db6 = Portc.2 , Db7 = Portc.0 , E = Portc.3 , Rs = Portc.5 'Wie im Schaltplan: Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0 Config Lcd = 16 * 2 Cursor On '--------- Tasteneingaenge High schalten Portd.2 = 1 Portd.3 = 1 '-------- Vars Dim Overflows As Word Dim Timer0count As Word Dim Flags As Byte Dim Tastcount As Word
in „Einstellbarer Frequenzgenerator für 0.12 Hz - 8 MHz mit Atmega 8 und Bascom“ · Projekte & Code ·
-
Datei
lcd_test_cfaf320240f.c
define LCD_RD PC5 #define LCD_CS PC4 #define LCD_RES PC2 // macros for control lines #define CLR_CD PORTC.OUT &= ~(1<<LCD_CD); #define SET_CD PORTC.OUT |= (1<<LCD_CD); #define CLR_CS PORTC.OUT &= ~(1<<LCD_CS); #define SET_CS PORTC.OUT |= (1<<LCD_CS); #define CLR_RESET PORTC.OUT &= ~(1<<LCD_RES); #define SET_RESET PORTC.OUT |= (1<<LCD_RES); #define CLR_WR PORTC.OUT &= ~(1 << LCD_WR); #define SET_WR PORTC.OUT |= (1 << LCD_WR); #define CLR_RD PORTC.OUT &= ~(1 << LCD_RD); #define SET_RD PORTC.OUT |= (1 << LCD_RD); //
in „LCD Display 320x240 pixel“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Segment_LCD.c
segs_out | ((segment_table[LCD_d_4] & 0x03)*64); //get digit_1000's A & B bits DDRD = 0; PORTD = 0x00; PORTC = segs_out; DDRC = 0xFF; // always on DDRD = 0x01; //COM1 asserted LOW break; case 1: PORTD = 0x01; PORTC = segs_out ^ 0xFF; // Compliment segment outputs DDRC = 0xFF; // always on DDRD = 0x01; //COM1
in „AVR241 mit Code für anderen Compiler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
<PB0); /*Taster on active low vorbereiten*/ DDRC |= (1<<PC1); DDRC |= (1<<PC2); DDRC |= (1<<PC0); PORTC &= ~(1<<PC2); PORTC &= ~(1<<PC1); PORTC &= ~(1<<PC0); /*Schaltausgänge PC1 und PC2 sowie KontrollLED initialisieren*/ TCCR0 = _BV(WGM00) | _BV(WGM01) | _BV(COM01) | _BV(CS00); TCCR2 = _BV(WGM20) |
in „Atmega32 PWM an OC2 funktioniert nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCDDisplay.c
/ Setze E auf 1 PORTC = 0b01000011; // Befehl disable(); // Jetzt E auf 0 -> fallende Flanke WaitMs(30); enable(); PORTC = 0b01000011; disable(); WaitMs(30); enable(); PORTC = 0b01000011; disable(); WaitMs(30); enable(); PORTC = 0b01000010; disable(); WaitMs(30); enable(); PORTC = 0b01000000; disable(); WaitMs(30); enable(); PORTC = 0b01000000; disable(); WaitMs(30); enable(); PORTC = 0b01001111; disable(); WaitMs(30); }
in „Display (HD4478099) zeigt nur Kästchen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Alarmanlage.c
(zeichen); } PORTC=0xFD; taste=PORTC; if(taste!=0xFD) { switch(taste) { case 0xEB: zeichen = '3'; break; case 0xDB: zeichen = '6'; break; case 0xBB: zeichen = '9'; break; case 0x7B: zeichen = 'B'; break; } Code_Eingabe(zeichen); } PORTC=0xFE; taste=PORTC; if(taste!=0xFE) { switch(taste) { case 0xE7: zeichen = 'F'; break; case 0xD7: zeichen = 'E'; break; case 0xB7: zeichen = 'D'; break; case 0x77: zeichen = 'C'; break; } Code_Eingabe
in „Problem mit Tastatur für Codeeingabe bei Alarmanlage“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
led_defines.h
, PD6 ) #define Taster4 debounce( PINB, PB7 ) #define LED1_ON PORTB |= (1 << PB2) #define LED2_ON PORTC |= (1 << PC1) #define LED3_ON PORTC |= (1 << PC2) #define LED4_ON PORTC |= (1 << PC3) #define LED5_ON PORTC |= (1 << PC4) #define LED6_ON PORTC |= (1 << PC5) #define LED7_ON PORTB |= (1 << PB1) #define LED8_ON PORTB |= (1 << PB6) #define LED1_OFF PORTB &= ~ (1 << PB2) #define LED2_OFF PORTC &= ~ (1 << PC1) #define LED3_OFF PORTC &= ~ (1 << PC2) #define LED4_OFF PORTC &= ~ (1 << PC3) #define LED5_OFF PORTC &= ~ (1 << PC4) #define LED6_OFF PORTC &= ~ (1 << PC5) #define LED7_OFF PORTB &=
in „Taster reagieren nach einiger Zeit nicht mehr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rs232-2-spi.asm
CPI tmp, 0x31 ; Wenn "1" BREQ transmit_one ; Alle anderen: nichts tun RETI transmission_end: CBI PORTC, 1 ; CL = 0 CBI PORTC, 0 ; CE = 0 RETI transmit_zero: SBI PORTC, 0 ; CE = 1 CBI PORTC, 2 ; DATA = 0 CBI PORTC, 1 ; CL = 0 CALL WAIT_200us ; wait 200us SBI PORTC, 1 ; CL = 1 RETI transmit_one: SBI PORTC, 0 ; CE = 1 SBI PORTC, 2 ; DATA = 1 CBI PORTC, 1 ; CL = 0 CALL WAIT_200us ; wait 200us SBI PORTC, 1 ; CL = 1 RETI ; ************************************************************************** ; Warten, Zeit verbraten ; *
in „RS232 zu SPI“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
frq16f628.asm
STATUS, RP0 ; make Port B4..7 input movlw B'11110000' iorwf TRISB, f bcf STATUS, RP0 BusyLoop bcf PORTC, LcdRs bsf PORTC, LcdRw ; Lesen bsf PORTC, LcdE nop movf PORTD, w movwf LcdStatus bcf PORTC, LcdE nop bsf PORTC, LcdE ; Enable nop bcf PORTC, LcdE btfsc LcdStatus, 7 ; teste bit 7 goto BusyLoop bcf
in „Von 10Mhz nach 20Mhz umschreiben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
frq16f628.asm
STATUS, RP0 ; make Port B4..7 input movlw B'11110000' iorwf TRISB, f bcf STATUS, RP0 BusyLoop bcf PORTC, LcdRs bsf PORTC, LcdRw ; Lesen bsf PORTC, LcdE nop nop ; warten movf PORTD, w movwf LcdStatus bcf PORTC, LcdE nop bsf PORTC, LcdE ; Enable nop bcf PORTC, LcdE btfsc LcdStatus, 7 ; teste bit 7 goto
in „Von 10Mhz nach 20Mhz umschreiben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
frq.asm
STATUS, RP0 ; make Port B4..7 input movlw B'11110000' iorwf TRISB, f bcf STATUS, RP0 BusyLoop bcf PORTC, LcdRs bsf PORTC, LcdRw ; Lesen bsf PORTC, LcdE nop movf PORTD, w movwf LcdStatus bcf PORTC, LcdE nop bsf PORTC, LcdE ; Enable nop bcf PORTC, LcdE btfsc LcdStatus, 7 ; teste bit 7 goto BusyLoop bcf
in „Von 10Mhz nach 20Mhz umschreiben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Werkzuegwechsler.c
Springe in die Schleife wen Z Achse auf 1/10 SPS = 1 und Freigabesignal = 1 { j=0; //Setze j auf 0 PORTC |= (1<<PC0); //Setze Z Achse Richtung auf 1 for (j=0; j<80; j++) //Zähle bis 80(Pulse) dan Spring aus der Schleife raus { PORTC |= (1<<PC1); //Setze Z Achse Puls = 1 warte (5000); //Einstellen der
in „Bräuchte hilfe bei der Programmierung eines Atmega 32“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
display__.c
Data Bit 6 (PC5) #define LCD_D7 PIN4_bm // Data Bit 7 (PC4) // Helper macros #define LCD_E_HIGH() (PORTC.OUTSET = LCD_E) #define LCD_E_LOW() (PORTC.OUTCLR = LCD_E) #define LCD_RS_HIGH() (PORTC.OUTSET = LCD_RS) #define LCD_RS_LOW() (PORTC.OUTCLR = LCD_RS) // Function Prototypes void lcd_send_nibble(uint8
in „EADOGM162W-A-Anzeige mit XMEGA“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
eadog.c
Data Bit 6 (PC5) #define LCD_D7 PIN4_bm // Data Bit 7 (PC4) // Helper macros #define LCD_E_HIGH() (PORTC.OUTSET = LCD_E) #define LCD_E_LOW() (PORTC.OUTCLR = LCD_E) #define LCD_RS_HIGH() (PORTC.OUTSET = LCD_RS) #define LCD_RS_LOW() (PORTC.OUTCLR = LCD_RS) // Function Prototypes void lcd_send_nibble(uint8
in „EADOGM162W-A-Anzeige mit XMEGA“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Test_die_zweite.txt
Motor_x 'Config Timer2 = Timer , Prescale = 1024 '8 Bit Timer 'Enable Timer2 'On Timer2 Motor_y Config Portc.0 = Output 'X DIR Config Portc.1 = Output 'X CLK Config Portc.2 = Output 'SLEEP 1 = Sleep 0 = Betrieb Portc.0 = 0 Portc.1 = 0 Portc.2 = 1 Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Portb.0 , Db5
in „AVR + Schrittmotor + Bascom verständnisproblem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Neu_Textdokument.txt
{ //ennableimpuls PORTC |= (1 << 2); /* setzt Bit 2 an PortC auf 1 */ _delay_ms(1); PORTC &= ~(1 << 2); /* loescht Bit 2 an PortC */ } void wait(){ //Portumstellung für Datenempfang DDRB = 0x00; // Daten Ports initialisieren PORTC |= (1 << 1); /* setzt Bit 1 an PortB auf 1 (R/W auf High für Busyflag)*/ while((PINB & (1 << 7))){ // bit 7 wird abgefragt gesetzt Busyflag } PORTC &= ~(1 << 1); /* loescht Bit 1 an PortC (R/W wieder
in „LCD Dotmatrix kaputt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD2.ASM
5ms: ldi R19, $C6 WGLOOP1_5ms: dec R19 brne WGLOOP1_5ms dec R18 brne WGLOOP0_5ms ret LCDenable: sbi PORTC,5 nop nop nop nop nop cbi PORTC,5 nop ret LCDcommand: mov r17,r16 swap r16 andi r16,0b00001111 out PORTC,r16 rcall LCDenable andi r17,0b00001111 out PORTC,r17 rcall LCDenable rcall delay_50us ret LCDdata: mov r17,r16 swap r16 andi r16,0b00001111 sbr r16,0b00010000 out PORTC,r16 rcall LCDenable andi r17,0b00001111 sbr r17,0b00010000 out PORTC,r17 rcall LCDenable rcall delay_50us ret LCDinit: rcall delay_15ms rcall delay_5ms ldi r16,0b00000011 out PORTC,r16 rcall LCDenable
in „LCD Tutorial“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
schaltkanal.c
Weil Systemtakt 1 MHz alterstand = zaehlerstand; if (ueberlauf !=1) { if (impulslaenge <= 1250) { PORTC |= (1<<PC0); PORTC &= ~(1<<PC1) | ~(1<<PC2); } if (impulslaenge >=1251 && impulslaenge <= 1750) { PORTC |= (1<<PC1); PORTC &= ~(1<<PC0) | ~(1<<PC2); } if (impulslaenge >=1751) { PORTC |= (1<<PC2); PORTC &= ~(1<<PC0) | ~(1<<PC1); } } else { ueberlauf = 0; } }
in „Servo Signal mit einem Atmel auswerten“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Schaltverzoegerung.txt
(Status[1] == '1') { PORTC |= (1 << Source_2); }; //Warte für die Dauer 'Triggertime' in us _delay_us(Time_us_[2]); if (Status[2] == '0') { PORTC &= ~(1 << Source_3); }; if (Status[2] == '1') { PORTC |= (1 << Source_3); }; /
in „Integer -> Char -> USART -> Char -> Integer (Übertragungsprotokoll)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
RGBSteuerung.c
einschalten sei(); while(1) { if (teiler == 0) { teiler = 255; PORTA = 0x00; PORTB = 0x00; PORTC = 0x00; PORTD = 0x00; } // Strip 1 if (teiler == channel[1]){PORTC |= (1<<PC0);} if (teiler == channel[2]){PORTC |= (1<<PC1);} if (teiler == channel[3]){PORTC |= (1<<PC2);} // Strip 2 if (teiler == channel[4]){PORTC |= (1<<PC3);} if (teiler == channel[5]){PORTC |= (1<<PC4);} if (teiler == channel[6]){PORTC |= (1<<PC5);} // Strip 3 if (teiler == channel[7]){PORTC |= (1<<PC6);} if (teiler == channel[8]){PORTC |=
in „30 Channel PWM mit ATMEGA32“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ATMega8_Digitale_Stereoanlage.bas
$regfile = "M8def.dat" $crystal = 20000000 $hwstack = 32 $swstack = 8 $framesize = 24 Config Portc.0 = Input 'Links in Config Portc.1 = Input 'Rechts in Config Portb.1 = Output 'Links out Config Portb.2 = Output 'Rechts out Config Portc.2 = Input 'Lautst+ Portc.2 = 1 Config Portc.3 = Input 'Lautst- Portc.3 = 1 Config Portc.4 = Input 'Bass+ Portc.4 = 1 Config Portc.5 = Input 'Bass- Portc.5 = 1 Waitms 1000 Config Timer1 = Timer , Prescale = 1 Tccr1a.wgm10 = 1 Tccr1a.wgm11 = 0 Tccr1b.wgm12 = 0 Tccr1b.wgm13
in „Digitaler Bass - fiepsen?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Code.txt
MOVWF TRISE BSF OSCCON,4 ;Taktfrequenz 4MHz BCF OSCCON,5 BSF OSCCON,6 CLRF PORTA CLRF PORTB CLRF PORTC CLRF PORTD CLRF PORTE Marke BTFSS PORTC,0 GOTO $-2 BSF LATB,0 BTFSS PORTC,1 GOTO $-2 BSF LATB,1 BTFSS PORTC,2 GOTO $-2 BSF LATB,2 BTFSS PORTC,3 GOTO $-2 BSF LATB,3 BTFSS PORTC,4 GOTO $-2 BSF LATB,4 BTFSS PORTC,5 GOTO $-2 BSF LATB,5 BTFSS PORTC,6 GOTO $-2 BSF LATB,6 BTFSS PORTC,7 GOTO $-2 BSF LATB,7 GOTO Marke END
in „PIC18F46K80 - Probleme mit Port-Konfiguration“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TIMERCTC.c
int x[8]; while(count<8) { x[count] = (T1 &(1<<count)); count++; } /*Testweise ausgabe auf PORT C PORTC=0x00; if (x[0]!=0) PORTC |= (1 << PINC0); if (x[1]!=0) PORTC |= (1 << PINC1); if (x[2]!=0) PORTC |= (1 << PINC2); if (x[3]!=0) PORTC |= (1 << PINC3); if (x[4]!=0) PORTC |= (1 << PINC4); if (x[5]!=0) PORTC |= (1 << PINC5); if (x[6]!=0) PORTC |= (1 << PINC6); if (x[7]!=0) PORTC |= (1 << PINC7); */ count=0; while(count<8) { if (x[count]==0) //wenn bit=0 { ontime_null(); } if (x[count]!=0) //wenn bit=1
in „Probleme bei Timer gesteuertem Pin ein-und ausschalten“ · Mikrocontroller und Digitale Elektronik ·