-
Datei
Bordcomputer_v1_0b.bas
KONFIGURATION AUSGÄNGE Config Portd.0 = Output Config Portd.1 = Output Config Portd.4 = Output Config Portc.5 = Output Config Portc.4 = Output Config Portc.3 = Output Config Portc.2 = Output Config Portc.1 = Output Config Portb.2 = Output Config Portb.1 = Output 'PULLUPS EINSCHALTEN Portd.2 = 1 Portd.3 =
in „[BASCOM] Berechnung läuft nicht richtig“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
display.asm
------------ Befehl_an_LCD: ;Sendet Befehle an das Display rcall busyflag ; Busyflag abfragen cbi portc,RS ; lösche BIT RS cbi portc,RW ; lösche BIT RW rcall sende_Daten ; Befehl ausgeben ret sende_Daten: ;UP für Befehle/Text versenden out portb,up_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 up_temp2 ; lösche Register up_temp2 out ddrb,up_temp2 ; Port B als Eingänge setzten cbi portc,RS ; lösche BIT RS sbi portc,RW ; setze BIT RW wb1: sbi portc,E ; setzen
in „[ AVR ] Probleme mit LCD-Display (KS0066)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Amp_Logic.bas
Byte 'BargraphStatus Dim Supplyamp As Integer Dim Temp_s As Byte Dim Temp As Single Config 1wire = Portc.5 Config Pind.0 = Input 'Menu hoch Portd.0 = 1 Config Pind.1 = Input 'Menu runter Portd.1 = 1 Config Pind.2 = Input 'Einschalten Portd.2 = 1 Config Pind.3 = Input 'Ausschalten Portd.3 = 1 Config Pind.4 = Input 'Save Portd.4 = 1 Config Portc.3 = Output Radio Alias Portc.3 Config Portc.4 = Output Bargraph Alias Portc.4 Config Portc.1 = Output Limiter Alias Portc.1 Config Portc.2 = Output Equalizer Alias Portc.2 Config Portd.5 = Output Loudness
in „Projekt : Mein Wohnzimmerverstärker“ · Analoge Elektronik und Schaltungstechnik ·
-
Datei
punktezaehler.bas
Zahl3a Alias Portb.4 Zahl3b Alias Portb.5 Zahl3c Alias Portb.6 Zahl3d Alias Portb.7 Zahl4a Alias Portc.0 Zahl4b Alias Portc.1 Zahl4c Alias Portc.2 Zahl4d Alias Portc.3 Zahl5a Alias Portc.4 Zahl5b Alias Portc.5 Zahl5c Alias Portc.6 Zahl5d Alias Portc.7 Multiplex1 alias portb.0 Multiplex2 Alias Portb.1
in „15x 7-Segmentanzeigen (5x 3er) mit Bascom“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
for the white or fourth channel /*---Define the states of the LED's (on/off)---*/ #define LED_R_ON PORTC |= (1<<PC4); #define LED_R_OFF PORTC &= ~(1<<PC4); #define LED_G_ON PORTC |= (1<<PC3); #define LED_G_OFF PORTC &= ~(1<<PC3); #define LED_B_ON PORTC |= (1<<PC2); #define LED_B_OFF PORTC &= ~(1<<PC2); //#define LED_W_ON PORTC |= (1<<PC1); //Again for the 4. channel / white //#define LED_W_OFF PORTC &= ~(1<<PC1); //Again for the 4. channel / white /*---DIP-Settings for DMX Adressing (1-256)---*/ #define PD_IN DDRD &= ~(
in „DMX und der Attiny2313“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
messen1.txt
#ifndef F_CPU #define F_CPU 4000000L #endif #define D4 eS_PORTC4 #define D5 eS_PORTC5 #define D6 eS_PORTC6 #define D7 eS_PORTC7 #define RS eS_PORTC2 #define EN eS_PORTC3 #include <avr/io.h> #include<stdlib.h> #include <util/delay.h> #include <inttypes.h> #include
in „ATMEGA324 LCD 2x16/ UART1 / ADC0“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
#ifndef F_CPU #define F_CPU 4000000L #endif #define D4 eS_PORTC4 #define D5 eS_PORTC5 #define D6 eS_PORTC6 #define D7 eS_PORTC7 #define RS eS_PORTC2 #define EN eS_PORTC3 #include <avr/io.h> #include<stdlib.h> #include <util/delay.h> #include <inttypes.h> #include
in „ATMEGA324 LCD 2x16/ UART1 / ADC0“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Timer0.asm
goto init org 0x04 init ; Initialisierung bsf STATUS, RP0 ; Bank = 1 bcf STATUS, RP1 MOVLW 0x00 ; PORTC = Ausgänge MOVWF TRISC MOVLW 0xFF ; PORTB = Eingänge MOVWF TRISB MOVLW 0x04 ; OPTION_REG initialisieren MOVWF OPTION_REG bcf STATUS, RP0 ; Bank = 0 MOVLW 0xFF ; LED Test MOVWF PORTC wait_s1 ; PORTB
in „PIC16F877 - Timer0-programm startet nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Quelltext.txt
If Key <> 0 Then Portc = Key Wait 1 Key = 8 Portc = Key End If Loop End Function Query_matrix() As Byte Key = 0 For Column = 0 To 4 Portb = $b00011111 If Column = 0 Then Reset Portb.0 If Column = 1 Then Reset Portb.1 If
in „5x5 Tastaturmatrix und es wir nur Müll eingelesen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rc5fb.bas
Txmain Return Volup: B = &H3B Gosub Txmain Return Voldown: B = &H00 Gosub Txmain Return Txmain: Set Portc.7 Waitms 9 Reset Portc.7 Waitms 4.5 Daten = &H82 Print "Custom Code Hex82" Call Txbits Daten = &H17 Print "Custom Code Hex17" Call Txbits Daten = B Print "Data Code Hex" Call Txbits Toggle Daten 'Print " Daten Hexwert: " ; Hex(daten) Call Txbits Set Portc.7 Waitus 562 'Print "warte 562" Reset Portc.7 Return Txbits: 'Print "Hexwert " ; Hex(daten) For A = 1 To 8 'Schleife zum ausgeben von 8 Bits Print A Print Bin(daten) Txnext: Set Portc.7 'Print " ich
in „Programmfehler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
mega64_uart.txt
brne rx_2 ;wenn nicht 2 dann weiter sbi PORTC, 1 ;wenn 2 dann relaise 2 Schalten rx_2: cpi mp, '3' ;mit 3 vergleiche brne rx_3 ;wenn nicht 3 dann weiter sbi PORTC, 2 ;wenn 3 dann relaise 3 Schalten rx_3: cpi mp, '4' ;mit 4 vergleiche brne rx_4 ;wenn nicht 4 dann weiter sbi PORTC, 3 ;wenn 4 dann relaise 4 Schalten rx_4: cpi mp, '5' ;mit 5 vergleiche brne rx_end ;wenn nicht 5 dann weiter sbi PORTC, 4 ;wenn 5 dann relaise 5 Schalten rx_end: ldi mp ,0x00 out PORTC, mp ; Alle Relais
in „mega64 UART“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
twi_test.c
Off // Pin6 Pin Change interrupt 1: Off // Pin7 Pin Change interrupt 1: Off PORTB.INT1MASK=0x00; // PORTC initialization // OUT register PORTC.OUT=0x08; // Pin0: Input // Pin1: Input // Pin2: Input // Pin3: Output // Pin4: Output // Pin5: Input // Pin6: Input // Pin7: Input PORTC.DIR=0x18; // Pin0 Output
in „Codevision, Xmega un IIC“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
CFsourcecode.txt
'************************ Anschlußbelegung *************************** ' - Daten: PortC ' - Reset: PortA.0 ' - CE1 : PortA.1 ' - OE : PortA.2 ' - CD1 : PortA.3 ' - WE : PortA.4 ' - BSY : PortA.5 ' - A00 : PortB.0 ' - A01 : PortB.1 ' - A02 : PortB.2 '***********************************
in „Indentify Drive bei CF-Karte“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lauflicht2.bas
config porta.3 = output config porta.6 = output config porta.4 = output config portb.0 = output config portc.0 = output config porta.7 = output config portd.7 = output Lcd_db4 Alias Portd.1 Lcd_db5 Alias Portc.4 Lcd_db6 Alias Portc.3 Lcd_db7 Alias Portd.0 Lcd_e Alias Portc.1 Lcd_rs Alias Portc.2 Config Lcd
in „pollin programmer+addon board lcd ansteuerung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lauflicht2.bas
config porta.3 = output config porta.6 = output config porta.4 = output config portb.0 = output config portc.0 = output config porta.7 = output config portd.7 = output Lcd_db4 Alias Portd.1 Lcd_db5 Alias Portc.4 Lcd_db6 Alias Portc.3 Lcd_db7 Alias Portd.0 Lcd_e Alias Portc.1 Lcd_rs Alias Portc.2 Config Lcd
in „pollin programmer +addon board lcd ansteuern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
include <util/delay.h> #include <stdint.h> #include "lcd.h" unsigned char getKey(void){ uint8_t filter; PORTC = 0b01111111; /* Activate internal Pull-Up resistors */ DDRC = 0b00000000; /* Set port as input */ PORTC &= ~(1<<PC0); /* Set column 0 to low */ DDRC |= (1<<PC0); /* Define column 0 as output */ filter
in „Matrix-Tastatur Abfrage in C“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
include <util/delay.h> #include <stdint.h> #include "lcd.h" unsigned char getKey(void){ uint8_t filter; PORTC = 0b01111111; /* Activate internal Pull-Up resistors */ DDRC = 0b00000000; /* Set port as input */ PORTC &= ~(1<<PC0); /* Set column 0 to low */ DDRC |= (1<<PC0); /* Define column 0 as output */ filter
in „Matrixtastatur C-Programm“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AU85CAM.ASM
r24,0xff ; PA0..7 Pull-Up-Wid. aktivieren out PORTA,r24 cbi DDRC,VSYNC ; Port C: VSYNC Eingang sbi PORTC,VSYNC cbi DDRC,HSYNC ; HSYNC Eingang sbi PORTC,HSYNC cbi DDRC,EXCLK ; EXCLK Tristate cbi PORTC,EXCLK cbi DDRC,PIXCLK ; PIXCLK Eingang sbi PORTC,PIXCLK cbi DDR_KEY,KEY_SNAPSHOT sbi PORT_KEY,KEY_SNAPSHOT
in „pollin kamera au-85“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
bf_atmega88a.h
define BFM_PIND5 BF_PIND.pind5 #define BFM_PIND6 BF_PIND.pind6 #define BFM_PIND7 BF_PIND.pind7 struct PORTC_bits { uint8_t portc0:1; uint8_t portc1:1; uint8_t portc2:1; uint8_t portc3:1; uint8_t portc4:1; uint8_t portc5:1; uint8_t portc6:1; uint8_t dummy7:1; } __attribute__((__packed__)); #define BF_PORTC (*(volatile struct PORTC_bits *)&PORTC) #define BFM_PORTC0 BF_PORTC.portc0 #define BFM_PORTC1 BF_PORTC.portc1 #define BFM_PORTC2 BF_PORTC.portc2 #define BFM_PORTC3 BF_PORTC.portc3 #define BFM_PORTC4 BF_PORTC.portc4 #define
in „AVR-Register als Bitfields“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
spi3.c
the SPI interrupt flag #asm in r30,spsr in r30,spdr #endasm // Global enable interrupts #asm("sei") PORTC.0=1; spimax(shutdown,0x01); // Shutdown PORTC.1=1; spimax(test,0x00); // Test PORTC.2=1; spimax(decode,0xFF); // Decode PORTC.3=1; spimax(scan,0x00); // Scan PORTC.4=1; spimax(intensity,0x0A); // Intensity PORTC.5=1; spimax(0x01,0x05); // Beschreibe Dig0 PORTC.6=1; while (1) { // Place your code here }; }
in „SPI allgemein, MAX7221“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ProjektWecker.c
Overflow Interrupt erlauben TIMSK |= (1<<TOIE0); //Global Interrupts aktivieren sei(); //init LCD RS_0; PORTC = 0b00111000;//8bit, 2zeilig, 5x7 E(); wait(); PORTC = 0b00001100;//Display ein E(); wait(); PORTC = 0b00000001;//clear Display E(); wait(); zeitstdweck = 6; zeitminweck = 0; while (1) { //////////
in „LED multiplexen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Netzteil1.txt
= 0x06; if (PINB & 1<<PINB7) //Speichern goto Speichern; //DA-Wandler: if(Tasterregister == 0x00) PORTC = Regelspannung; if(Tasterregister == 0x01) PORTC = 0x19; if(Tasterregister == 0x02) PORTC = 0x26; if(Tasterregister == 0x03) PORTC = 0x5B; if(Tasterregister == 0x04) PORTC = 0xB6; if(Tasterregister == 0x05) PORTC = Speicher1; if(Tasterregister == 0x06) PORTC = Speicher2; //Anzeige Gleitkommazahl adcval = ReadChannel(0); //Spannung einlesen Spannungswert = ADCH, ADCL; adcval = ReadChannel(1); //Strom einlesen
in „Gleitkommazahlen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
usb-io.c
PORTB=(valueB & DDRB) | (PORTB & ~DDRB); PORTC=(valueC & DDRC) | (PORTC & ~DDRC); PORTD=(valueD & DDRD) | (PORTD & ~DDRD); break; } } // Execute a d, p or o command for a single port // d=direction input/output // p=pullup enabling // o=output
in „Kommunikationsprobleme USB-IO Chip45 Crumb168“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
dmx-pwm24.c
PAT(&PORTA, 3), // 4-7 PAT(&PORTA, 2), PAT(&PORTA, 7), PAT(&PORTA, 6), PAT(&PORTA, 5), // 8-11 PAT(&PORTC, 5), PAT(&PORTC, 6), PAT(&PORTC, 7), PAT(&PORTC, 2), // 12-15 PAT(&PORTC, 3), PAT(&PORTC, 4), PAT(&PORTD, 7), PAT(&PORTC, 0), // 16-19 PAT(&PORTC, 1), PAT(&PORTD, 6), PAT(&PORTD, 5), PAT(&PORTD, 4)
in „C - Ersatz von switch case.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lauflicht2.bas
config porta.2 = 1 config porta.3 = 1 config porta.6 = 1 config porta.4 = 1 config portb.0 = 1 config portc.0 = 1 config porta.7 = 1 config portd.7 = 1 Lcd_db4 Alias Portd.1 Lcd_db5 Alias Portc.4 Lcd_db6 Alias Portc.5 Lcd_db7 Alias Portd.6 Lcd_e Alias Portc.7 Lcd_rs Alias Portc.2 Config Lcd = 16 * 2 Config
in „pollin programmer +addon board lcd ansteuern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
quelltext.txt
setzten OUt DDRA,Temp Rcall Wait Rcall LCD_init ;Initalisiere LCD Display LCD_Init: LDI TEMP,0x30 OUT PORTC,TEMP SBI PORTA,7 Nop Nop Nop CBI PORTA,7 Rcall Wait LDI TEMP,0x30 OUT PORTC,TEMP SBI PORTA,7 Nop Nop Nop CBI PORTA,7 Rcall Wait LDI TEMP,0x30 OUT PORTC,TEMP SBI PORTA,7 Nop Nop Nop CBI PORTA,7 Rcall
in „LCD Display läst sich nich Initalisieren“ · Projekte & Code ·
-
Datei
AB1_board_input.txt
init_pwm(); while(1) { OCR1A = v_aktuell; if (!(PIND & (1<<PIND0))) { v_aktuell = rampe(v_aktuell,0); PORTC ^= (1<<PC5); PORTC ^= (1<<PC4); _delay_ms(250); v_aktuell = rampe(v_aktuell,v_max); } if (!(PIND & (1<<PIND1))) { PORTC ^= (1<<PC3); //toggle _delay_ms(250); v_aktuell = rampe(v_aktuell,0); } if (!(PIND & (1<<PIND2))) { PORTC ^= (1<<PC0); //toggle if (posss<254) posss++; } if (!(PIND & (1<<PIND3))) { PORTC ^= (1<<PC0); //toggle if (posss>0) posss--; } } //while 1 } // main
in „"Conflicting types for." ich finde den Fehler nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
3Sensoren.c
1<<DDC0)|(1<<DDC1)|(1<<DDC2)|(1<<DDC3)|(1<<DDC4)|(1<<DDC5)|(1<<DDC6);// PC1,2,3 als output für CS PORTC &= ~(1<<PC0); PORTC &= ~(1<<PC4); PORTC &= ~(1<<PC5); PORTC &= ~(1<<PC6); DDRB = (1<<DDB0)|(1<<DDB1)|(1<<DDB6)|(1<<DDB7); //unbenutzt PORTB &= ~(1<<PB0); PORTB &= ~(1<<PB1); PORTB &= ~(1<<PB6); PORTB
in „Beschleunigungssensor“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Jahresarbeit.asm
: sbic PINC,2 rjmp aus2 sbi PORTC,2 weiter2:rcall delay ret aus2: cbi PORTC, 2 rjmp weiter2 ;;;;;;;;;;;;;;;;;;;;;;;;;an/aus Routine für Relais1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Rel_Eins: sbic PINC,3 rjmp aus1 sbi PORTC,3 weiter1:rcall delay ret aus1: cbi PORTC, 3 rjmp weiter1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Hauptprogramm
-
Datei
IRAtmega8.bas
'Mittlerer und gleich danebenliegender Kontakt: 'Mittlerer An Lo(0v) , Äußerer An Hi(+5v) 'Led An Portc.0 'Testleds An Portc.1 Und Portc.2 'Speichert 16 Fb-Tasten 'Beliebige Ir-Fernbedienung moderner Bauart, egal ob RC5 oder anderer Code '1) Starten '2) Tasten 1 -9 / 0 / * # ABCD auf FB auswählen '3)
in „Atmega - Jede beliebige IR-Fernbedienung erkennen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
IRAtmega8.bas
'Mittlerer und gleich danebenliegender Kontakt: 'Mittlerer An Lo(0v) , Äußerer An Hi(+5v) 'Led An Portc.0 'Testleds An Portc.1 Und Portc.2 'Speichert 16 Fb-Tasten 'Beliebige Ir-Fernbedienung moderner Bauart, egal ob RC5 oder anderer Code '1) Starten '2) Tasten 1 -9 / 0 / * # ABCD auf FB auswählen '3)
in „Atmega - Jede beliebige IR-Fernbedienung erkennen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
4x4_keydebouncing_0.1.c
**********************************************************/ #define KEY_PIN PINC #define KEY_PORT PORTC #define KEY_DDR DDRC #define KEY_ROW1 PORTC0 #define KEY_ROW2 PORTC1 #define KEY_ROW3 PORTC2 #define KEY_ROW4 PORTC3 #define KEY_COL1 PORTC4 #define KEY_COL2 PORTC5 #define KEY_COL3 PORTC6 #define KEY_COL4 PORTC7 #define KEY0 0 // Taste: #define KEY1 1 // Taste: #define KEY2 2 // Taste: #define KEY3 3 // Taste: #define KEY4 4 // Taste: #define KEY5 5 // Taste: #define KEY6 6 // Taste: #define KEY7 7 // Taste
in „4x4 Matrixtastatur mit Tasterentprellung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
4433vfd1.asm
out DDRC, temp1 ;kurzes Delay ldi Delay2, Long rcall Pause ;alle Latches auf hi ldi temp1, 0xff out PORTC, temp1 ldi temp1, 0x00 out PORTD, temp1 ;kurzes Delay ldi Delay2, Long rcall Pause ldi temp1, 0x00 out PORTC, temp1 ; ldi Delay2, Long rcall Pause ;stop2: ; rjmp Stop2 sbi portc, 2 ldi temp1, 0xdd out PORTD, temp1 nop nop ldi Delay2, Long rcall Pause cbi portc, 2 ldi Delay2, Long rcall Pause sbi portc, 1 ldi temp1, 0xee out PORTD, temp1 nop nop ldi Delay2, Long rcall Pause cbi portc, 1 ldi Delay2, Long rcall Pause sbi portc, 1 ldi temp1, 0xdd out PORTD,
in „74HCT573 Latch am AVR“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD_INI2.ASM
lcd_data rcall delay_5ms ldi temp1, 't' ;Zeichen anzeigen rcall lcd_data loop: rjmp loop lcd_data: sbi PORTC,3 out PORTD,temp1 rcall enable_lcd rcall busy_check ret lcd_clear: rcall command_lcd ldi r16,0x01 out PORTD,r16 rcall enable_lcd rcall delay_5ms ret busy_check: cbi PORTC,3 ;RS = 0 sbi PORTC,4 ;R/W
in „LCD HD44780 Busy Flag“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
mr_uc_init.c
// Pin6 Pin Change interrupt 1: Off // Pin7 Pin Change interrupt 1: Off PORTB.INT1MASK = 0x00; // PORTC initialization // OUT register PORTC.OUT = 0x00; // Pin0: Input // Pin1: Input // Pin2: Input // Pin3: Input // Pin4: Input // Pin5: Input // Pin6: Input // Pin7: Input PORTC.DIR = 0x00; // Pin0 Output
in „Jump zum Bootloader beim XMEGA“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Analog.C.txt
outp((1<<PD0)|(X_FahrRicht<<PC1), PORTC); /*Fahrtrichtung an Port 0, Port 0 auf "1" für Fahrbefehl*/ outp((0<<PD0), PORTC); /*Port 0 auf "0", ein Fahrbefehl abgeschlossen*/ } void Y_FahrBefehl() /*gibt Fahrrichtung (1 oder 0) an PortC PC3
in „analog wert“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd_ok.asm
15ms warten rcall warte5ms rcall warte5ms rcall warte5ms ; interface auf 8 bit ldi lcd3,0x30 out portc,lcd3 rcall lcd_enable ; min 4,1ms warten rcall warte5ms ; interface auf 8 bit ldi r16,0x30 out portc,lcd3 rcall lcd_enable ; min 100us warten rcall warte1ms ; interface auf 8 bit ldi r16,0x30 out portc,lcd3 rcall lcd_enable rcall warte5ms ; 2zeilig 5x8 matrix ldi lcd3,0x38 out portc,lcd3 rcall lcd_enable rcall warte1ms ldi lcd3,0x08 out portc,lcd3 rcall lcd_enable rcall warte5ms ldi lcd3,0x0f out portc,lcd3 rcall lcd_enable rcall warte5ms ldi lcd3,0x07 out portc,lcd3 rcall lcd_enable
in „LCD Disply mit dem 8535“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
pwm_test.bas
Green05 Alias Portb.4 Green06 Alias Portb.5 Green07 Alias Portb.6 Green08 Alias Portb.7 Blue01 Alias Portc.0 Blue02 Alias Portc.1 Blue03 Alias Portc.2 Blue04 Alias Portc.3 Blue05 Alias Portc.4 Blue06 Alias Portc.5 Blue07 Alias Portc.6 Blue08 Alias Portc.7 Dim Inputstr As String * 4 Dim Key As Integer ,
in „Ansteuern von 300 RGB-LEDs“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
USART.c
Line[40]; // String mit maximal 39 zeichen uart_gets( Line, sizeof( Line ) ); if(Line == "on") { PORTC &= ~(1<<0); } else { PORTC |= (1<<0); PORTC &= ~(1<<1); printf("TEST: %u",Line); } //if(Line == "off") //{ // PORTC |= (1<<0); //} /*// Empfangen eines Zeichens if ( (UCSRA & (1<<7)) ) // 7= RXC { // Zeichen wurde empfangen, jetzt abholen c= uart_getc(); PORTC = c; } else { } */ /* Ausgabe if(PINB&(1<<0)) { printf("Licht EIN \r"); PORTC &= ~(1<<0); } else { printf("Licht AUS \r"); // (\r= enter) PORTC |= (1<<0); } */ }; }
in „USART Problem (Anfänger)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
USART.c
maximal 39 zeichen char Line2[40]="on"; uart_gets( Line, sizeof( Line ) ); if(!strcmp(Line,Line2)) { PORTC &= ~(1<<0); } else { PORTC |= (1<<0); PORTC &= ~(1<<1); printf("Empfangen wurde: %s",Line); } //if(Line == "off") //{ // PORTC |= (1<<0); //} /*// Empfangen eines Zeichens if ( (UCSRA & (1<<7)) ) // 7= RXC { // Zeichen wurde empfangen, jetzt abholen c= uart_getc(); PORTC = c; } else { } */ /* Ausgabe if(PINB&(1<<0)) { printf("Licht EIN \r"); PORTC &= ~(1<<0); } else { printf("Licht AUS \r"); // (\r= enter) PORTC |= (1<<0); } */ }; }
in „USART Problem (Anfänger)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd-routines.asm
andi temp1L, 0b00001111 ; oberes Nibble auf Null setzen sbr temp1L, 1<<4 ; entspricht 0b00010000 out PORTC, temp1L ; ausgeben rcall lcd_enable ; Enable-Routine aufrufen andi temp2L, 0b00001111 ; obere Hälfte auf Null setzen sbr temp2L, 1<<4 ; entspricht 0b00010000 out PORTC, temp2L ; ausgeben rcall lcd_enable
-
Datei
6_Funkfernbedienung_V1.1.bas
Config Pinb.7 = Input Portb.7 = 1 ' Pullup aktivieren ' Config Portb.1 = Output ' für LED Config Portc.5 = Output ' für Sender Config Portc.4 = Output Config Portc.3 = Output ' Aliase zur Vereinfachung setzen ' ====================================================================================== ' Led Alias Portb.1 Sender_daten Alias Portc.5 Sender_strom1 Alias Portc.4 Sender_strom2 Alias Portc.3 ' Aliase für die Dip-Schalter Schalter_1 Alias Pind.0 Schalter_2 Alias Pind.1 Schalter_3 Alias Pind.2 Schalter_4 Alias Pind.3 Schalter_5 Alias
in „Sender für Funkfernsteuerung für Dorma-Torantriebe, z.B. Modell HS43“ · Projekte & Code ·
-
Datei
Inkrementalgeber_-_test.cc
TOIE0; //enable timer interrupt // TCNT0 = 57723; DDRB = 0xFF; // PORTB als Ausgang DDRC = 0xFF; // PORTC als Ausgang PORTC = (1<<PC4); // Achse EIN PORTC = (1<<PC5); // Achse Pause sei(); // Interrupt erlauben for(;;) { // Hauptschleife.... // Erfassung der Drehrichtung: // enc_delta Wert wird nach jeder
-
Datei
20130919Schiebe595out597in.c
)) { //warten } } int main(void) { uint8_t zahl = 0xFF; SPI_MasterInit(); PORTB &= ~(1<<DD_SS_o); PORTC |= (1<<DD_p597); while(1) { PORTC &= ~(1<<DD_SS_i); PORTC |= (1<<DD_SS_i); PORTC &= ~(1<<DD_SS_i); PORTC |= (1<<DD_p597); PORTC &= ~(1<<DD_p597); PORTC |= (1<<DD_p597); // zahl = SPI_SlaveReceive()
in „Problem Schieberegister 595er ud 597er“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
20130919Schiebe595out597in.c
main(void) { uint8_t zahl = 0x00; uint8_t dummy = 0xEE; SPI_MasterInit(); PORTB &= ~(1<<DD_SS_o); PORTC |= (1<<DD_p597); while(1) { // input verarbeiten PORTC &= ~(1<<DD_SS_i); PORTC |= (1<<DD_SS_i); PORTC &= ~(1<<DD_SS_i); PORTC |= (1<<DD_p597); PORTC &= ~(1<<DD_p597); PORTC |= (1<<DD_p597); zahl =
in „Problem Schieberegister 595er ud 597er“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
avr-m8_z80.asm
zl rol zh ;z=addr[15-7] rcall dram_setaddr cbi PORTB,ram_ras ldi zh,0 mov zl,adrl ori zl,0x80 cbi PORTC,ram_w ;early write rcall dram_setaddr cbi PORTC,ram_cas sbi PORTC,ram_cas ldi zh,0 mov zl,adrl andi zl,0x7F rcall dram_setaddr swap temp DRAM_SENDNIBBLE cbi PORTC,ram_cas sbi PORTC,ram_cas sbi PORTC
in „CP/M auf ATmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
avr-m8_z80.asm
zl rol zh ;z=addr[15-7] rcall dram_setaddr cbi PORTB,ram_ras ldi zh,0 mov zl,adrl ori zl,0x80 cbi PORTC,ram_w ;early write rcall dram_setaddr cbi PORTC,ram_cas sbi PORTC,ram_cas ldi zh,0 mov zl,adrl andi zl,0x7F rcall dram_setaddr swap temp DRAM_SENDNIBBLE cbi PORTC,ram_cas sbi PORTC,ram_cas sbi PORTC
in „CP/M auf ATmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
avr_cpm.asm
zl rol zh ;z=addr[15-7] rcall dram_setaddr cbi PORTB,ram_ras ldi zh,0 mov zl,adrl ori zl,0x80 cbi PORTC,ram_w ;early write rcall dram_setaddr cbi PORTC,ram_cas sbi PORTC,ram_cas ldi zh,0 mov zl,adrl andi zl,0x7F rcall dram_setaddr swap temp DRAM_SENDNIBBLE cbi PORTC,ram_cas sbi PORTC,ram_cas sbi PORTC
in „CP/M auf ATmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Temp_Host.c
<<4); DDRB|= 1<<4; break; case 3: PORTB|= 1<<4; DDRB&= ~(1<<4); nop(); Ziffer(Anzeige[3]); nop(); PORTC&= ~(1<<1); DDRC|= 1<<1; break; case 4: PORTC|= 1<<1; DDRC&= ~(1<<1); nop(); Ziffer(Anzeige[4]); nop(); PORTC&= ~(1<<3); DDRC|= 1<<3; break; case 5: PORTC|= 1<<3; DDRC&= ~(1<<3); nop(); Ziffer(Anzeige
in „C, Variable 0xFF wird als !=0xFF erkannt?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
timtertest.c
; // Hilfszaehler icrementieren i++; // i erzeugt Takt von 1s ( 50 x 20 ms) if (i==50) { i=0; if (PORTC.1) --PORTC.1; else ++PORTC.1; } } // Timer 1 overflow interrupt service routine interrupt [TIM1_OVF] void timer1_ovf_isr(void) { // Reinitialize Timer 1 value // TCNT1H=0x63; // TCNT1L=0xC0; // // ++j; // if (j>=45) // { // if (PORTC.0) // --PORTC.0; // else // ++PORTC.0; // j=0; // } } // Declare your global variables here void main(void) { PORTA=0x00; DDRA=0x00; PORTB=0x00; DDRB=0xFF; PORTC=0x00; DDRC=0xFF; PORTD=0x00; DDRD=0x00
in „CodeVision und die Timers“ · Mikrocontroller und Digitale Elektronik ·