-
Datei
RGB_Led1.asm
r1 mul ZielB, ZielB mov ZielB2, r1 Loop: inc Counter cp Counter, ZielR2 brlo RotAn nop nop nop cbi PORTC, 3 WeiterR: cp Counter, ZielG2 brlo GruenAn nop nop nop cbi PORTC, 4 WeiterG: cp Counter, ZielB2 brlo BlauAn nop nop nop cbi PORTC, 5 WeiterB: Tastencheck: ldi r16, 0xFF cp Counter, r16 breq Tastencheck2 rjmp Loop RotAn: sbi PORTC, 3 rjmp WeiterR GruenAn: sbi PORTC, 4 rjmp WeiterG BlauAn: sbi PORTC, 5 rjmp WeiterB Tastencheck2: inc counter2 cpi Counter2, 5 brlo Loop ; Nur alle 5 Durchläufe die Taste checken! ldi Counter2, 0
in „Mysterium...“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
flashdump.c
<util/delay.h> #include "uart.c" //************** //* Wackelpins * //************** #define RE_hi PORTC |= (1 << PC0);_delay_us(100) #define RE_lo PORTC &= ~(1 << PC0);_delay_us(100) #define PRE_hi PORTC |= (1 << PC1);_delay_us(100) #define PRE_lo PORTC &= ~(1 << PC1);_delay_us(100) #define CE_hi PORTC |= (1 << PC2);_delay_us(100) #define CE_lo PORTC &= ~(1 << PC2);_delay_us(100) #define CLE_hi PORTC |= (1 << PC4);_delay_us(100) #define CLE_lo PORTC &= ~(1 << PC4);_delay_us(100) #define ALE_hi PORTC |= (1 << PC5);_delay_us(100) #define ALE_lo PORTC
in „Pollin - Receiver-Mainboard mit Twin DVB-[T,C] Tuner, NXP PNX8950EH“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AVRrescue.c
// the 2113 and Tiny26 sockets only have a XA1/BS2 combi pin; we have to set XA1 and BS2 case 0: PORTC &= ~(_B1(BS1)); PORTC &= ~(_B1(XA1)); PORTB &= ~(_B1(BS2)); break; case 1: PORTC |= (_B1(BS1)); PORTC |= (_B1(XA1)); PORTB |= (_B1(BS2)); break; case 2: PORTC &= ~(_B1(BS1)); PORTC |= (_B1(XA1)); PORTB
in „AVR-Rescue: standalone Parallel HV-Programmer“ · Projekte & Code ·
-
Datei
lcd.asm
; PortB alle inputs movwf TRISB bcf STATUS, RP0 BL ;BusyLoop bcf PORTC, LcdRs bsf PORTC, LcdRw ; Lesen bsf PORTC, LcdE nop movf PORTB, w movwf LcdStatus bcf PORTC, LcdE nop ; bsf PORTC, LcdE ; Enable ; nop ; bcf PORTC, LcdE btfsc LcdStatus, 7 ; teste bit 7 goto BL bcf
in „lcd mit pic18f242?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
test.asm
rcall wait5m; 5ms warten out PORTA, temp;30H ausgeben sbi PORTC,PC2; E setzen nop nop nop cbi PORTC,PC2; E zurücksetzen rcall wait5m; 5ms warten out PORTA, temp;30H ausgeben sbi PORTC,PC2; E setzen nop nop nop cbi PORTC,PC2; E zurücksetzen ;8-Bit-Ansteuerung, 4
in „ATMEGA128: LCD Displayintialisierung (HD44780) mit Assembler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
tastertolcd.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 „PIC 16F628A - LCD ansteuern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Knight_Rider.bas
Waitms 50 Portb.4 = 0 Portb.5 = 1 Waitms 50 Portb.5 = 0 Portc.0 = 1 Waitms 50 Portc.0 = 0 Portc.1 = 1 Waitms 50 Portc.1 = 0 Portc.2 = 1 Waitms 50 Portc.2 = 0 Portc.3 = 1 Waitms 50 Portc.3 = 0 'Knight Rider Vorlauf 10 LEDŽs Portc.1 = 1 Waitms 50 Portc.1 = 0 Portc.0 = 1 Waitms 50 Portc.0 = 0 Portb.5 = 1 Waitms 50 Portb.5 = 0 Portb.4 = 1 Waitms 50 Portb.4 = 0 Portb.3 = 1 Waitms 50 Portb.3 = 0 Portb.2 = 1 Waitms 50 Portb.2 = 0 Portb.1 = 1 Waitms 50 Portb.1 = 0 Portb.0 = 1 Waitms 50
in „0.o Was ist Falsch?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
test.c
PORTB &=~(1<<PB5); } } if (schalt==1){ if (PINB &(1<<PINB1)){ PORTB &= ~(1<<PB0); PORTB &= ~(1<<PB5); PORTC|=(1<<PC0); PORTC|=(1<<PC1); } else{ PORTC &=~(1<<PC0); PORTC &=~(1<<PC1); } } if (schalt==2){ if (PINB &(1<<PINB1)){ PORTC &= ~(1<<PC0); PORTC &= ~(1<<PC1); PORTC|=(1<<PC2); PORTC|=(1<<PC3); } else{ PORTC &=~(1<<PC2); PORTC &=~(1<<PC3); } } if (schalt==3){ if (PINB &(1<<PINB1)){ PORTC &= ~(1<<PC2); PORTC &= ~(1<<PC3); } } } // Mainloop-Ende }
in „LEDs langsam auf- und wieder abdimmen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
programm.c
0; /*for (a = 0; a < 10; a++) { }*/ PORTA = 0x00; PORTC = 0x00; a = 0; for (y = 0; y < 10; y++) { PORTA = 0xAA; PORTC = 0x55; _delay_ms(250); PORTC = 0xAA; PORTA = 0x55; _delay_ms(250); PORTA = 0x55; PORTC = 0xAA; _delay_ms(250); PORTA = 0xAA; PORTC = 0x55; _delay_ms(65); PORTC = 0xAA; PORTA = 0x55; _delay_ms(65); PORTA = 0x55; PORTC = 0xAA; _delay_ms(65); PORTC = 0x55; PORTA = 0xAA; RS = 0; } PORTA = 0x00; PORTC = 0x00; i = 0; y = 0; x = 0; RS = 0; } } }
in „Einfaches C Programm (Taster als Schalter) Problem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
display.c
Flag lesen asm("nop"); asm("nop"); PORTC= 0x02; // E zuruecksetzen } } void display_cmd(char cmd){ //ein Kommando cmd an das Display senden int i; PORTC =0; for (i=8; i>0; i--){ PORTC = (cmd >> 7); // Das oberste Bit von cmd auf PC0 asm("
in „74HC595 und Atmega8“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Programm_f_r_Forum.txt
PORTA&(1<<PA3) && PINC&(1<<PINC5) && PINC&(1<<PINC3)) { PORTA=~(1<<PA3); // Hier Port A3 zurücksetzen PORTC|=(1<<PC7); _delay_ms(5000); while(!(PIND&(1<<PIND4)) && !(PIND&(1<<PIND5))) // Leds setzen { PORTF=~(1<<PF2); PORTF=~(1<<PF6); } while(PORTC&(1<<PC7) && PIND&(1<<PIND4) && PIND&(1<<PIND5)) { PORTC=
in „Warnung beim verwenden jeweils jeden 7.Portpin als Ausgang“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Elektoronik.c
{ PORTC |= LED_GREEN; } break; } case 0x11: { blinkCnt ++; if (blinkCnt == BLINKPERIODE) { blinkCnt = 0; } if (blinkCnt < BLINKBREITE) { PORTC &= ~LED_RED; } else { PORTC |= LED_RED; } break; } case 0x20:
in „ATmega8 ADC-Durchschnittsberechnung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD_Control.c
und Daten übernehmen _delay_ms(4.1); //4,1ms warten PORTC |= (1<<E_LCD); //Enable setzen _NOP(); LCD_DAT_OUT = 0x38; //8-Bit interface _NOP(); PORTC &= ~(1<<E_LCD); //Enable löschen und Daten übernehmen _delay_us(100); //weitere 100us warten PORTC |= (1<<
in „LCD-Initialisierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
glcd.c.txt
char coordY; int anz = 0; char x1, x2, y1, y2; unsigned char lcdStatus; //Defines #define instDataH PORTC |= (1<<PORTC1) #define instDataL PORTC ^= (1<<PORTC1) #define readWriteH PORTC |= (1<<PORTC2) #define readWriteL PORTC ^= (1<<PORTC2) #define chip1H PORTB |= (1<<PORTB0) #define chip1L PORTB ^= (1<
in „Frage zu Display-Code“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LED-Test.txt
Config Portb.2 = Output Config Portb.3 = Output Config Portb.4 = Output Config Portb.5 = Output Config Portc.0 = Output Config Portc.1 = Output Config Portc.2 = Output Config Portc.3 = Output Config Portc.4 = Output Config Portc.5 = Output Portb.0 = 0 Portb.1 = 0 Portb.2 = 0 Portb.3 = 0 Portb.4 = 0 Portb.5 = 0 Portc.0 = 0 Portc.1 = 0 Portc.2 = 0 Portc.3 = 0 Portc.4 = 0 Portc.5 = 0
in „PortC.1 immer auf low“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Blitzer.txt
Definiton der LEDŽs Const On = 1 Const Off = 0 Config Portb.0 = Output Config Portb.1 = Output Config Portc.0 = Output Config Portc.1 = Output Config Portc.2 = Output Config Portc.3 = Output Dim Speed As Integer '------------------------------------------------------------------------------ Speed = 5 Do
in „Suche Hilfe bei BASCOM, Unterprogramm und Poti Ansteuerung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
ADMUX=YP|(1<<REFS0); if (status==PRESSED) x=x-x/32+ADC; cbi(DDRC, YP); //Y Eingang cbi(DDRC, YN); sbi(PORTC, YP); //Y Pullup cbi(PORTC, YN); cbi(PORTC, XP); //X auf Low cbi(PORTC, XN); sbi(DDRC, XP); //X auf Ausgang sbi(DDRC, XN); state=1; sbi(ADCSR,ADSC); } else if (state==1) { if (PINC&(1<<YP)) //Messen
in „LCD Controller für 640x480 LCD mit mega8515“ · Projekte & Code ·
-
Datei
M_ll.c
); PORTB &= ~(1<<PB3); PORTB |= (1<<PB5); } void LED16() { PORTB |= (1<<PB5); PORTB &= ~(1<<PB4); PORTC |= (1<<PC0); } void LED17() { PORTC |= (1<<PC0); PORTB &= ~(1<<PB5); PORTC |= (1<<PC1); } void LED18() { PORTC |= (1<<PC1); PORTC &= ~(1<<PC0); PORTC |= (1<<PC2); } void LED19() { PORTC |= (1<<PC2); PORTC &= ~(1<<PC1); PORTC |= (1<<PC3); } void LED20() { PORTC |= (1<<PC3); PORTC &= ~(1<<PC2); PORTD |= (1<<PD0); } int main(void) // Hauptprogramm { init(); while(1) // Endlosschleife { if ( PINC &(1<<PC5
in „Verbesserungsvorschläge zu eigenem kleinen Programm“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
t6963.c
zahl_buffer[10]; char flash format[5]; char Zeichen; void pause(void) { #asm nop nop #endasm } void PORTC_output(void) { DDRC = 0xFF; PORTC = 0; } void PORTC_input(void) { DDRC = 0x00; PORTC = 0xFF; } void autoreset(void) { PORTC = 0xB2; pause(); wr = 0; pause(); wr = 1; } void autowrite(void) { PORTC
in „Bitmap auf Display darstellen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
T6963C.C
#define RD PD5 #define CE PD6 #define CD PD7 #define STA0 PC0 #define STA1 PC1 #define Data_port PORTC */ #define Data_port PORTB #define WR (PORTC, 0) #define RD (PORTC, 1) #define CE (PORTE, 4) #define CD (PORTC, 2) #define STA0 (PORTB, 0) #define STA1 (PORTB, 0) void status_check(void) { cbi (DDRB
in „T6963C Grafikdisplay funktioniert nur ab und zu“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
t6963.c
} interrupt [UART_TXC] void uart_tx_isr(void) { } void pause(void) { #asm nop nop #endasm } void PORTC_output(void) { DDRC = 0xFF; PORTC = 0; } void PORTC_input(void) { DDRC = 0x00; PORTC = 0xFF; } void autoreset(void) { PORTC = 0xB2; pause(); wr = 0; pause(); wr = 1; } void autowrite(void) { PORTC
in „Probleme mit Funktion "itoa"“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
minute5 == 8){ //D1.8 PORTA |= (1 << PA7); } else{ PORTA &= ~(1 << PA7); } if (minute5 == 9){ //D1.9 PORTC |= (1 << PC7); } else{ PORTC &= ~(1 << PC7); } if (minute5 == 10){ //D1.10 PORTC |= (1 << PC6); } else{ PORTC &= ~(1 << PC6); } if (minute5 == 11){ //D1.11 PORTC |= (1 << PC5); } else{ PORTC &= ~(1
in „Probleme mit Ausgängen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Ind_stat.h
PC4 PC3 PD0 PC5 PC7 3 PD6 PD7 PA5 PA6 PA7 PD3 PD5 4 PC1 PA0 PA1 PA3 PA4 PC0 PA2 */ #define ResBC1 (PORTC |= (1<<PC2)) #define SetBC1 (PORTC &= ~(1<<PC2)) #define Resh2 (PORTC |= (1<<PC7)) #define Seth2 (PORTC &= ~(1<<PC7)) #define Resa2 (PORTD |= (1<<PD1)) #define Seta2 (PORTD &= ~(1<<PD1)) #define Resb2 (PORTD |= (1<<PD2)) #define Setb2 (PORTD &= ~(1<<PD2)) #define Resc2 (PORTC |= (1<<PC6)) #define Setc2 (PORTC &= ~(1<<PC6)) #define Resd2 (PORTC |= (1<<PC4)) #define Setd2 (PORTC &= ~(1<<PC4)) #define Rese2 (PORTC |= (1<<PC3)) #define Sete2 (PORTC &= ~(1<<PC3)) #define Resf2
in „Eine "Kinderfrage" bzg. *.h und *.c“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd.c
write data (RS=1, RW=0) /* output high nibble first */ outp( (data&0xF0)|(0x01), PORTC ); enLCD(); /* output low nibble */ outp( ((data<<4)&0xF0)|(0x01), PORTC ); enLCD(); } else { //write instruction (RS=0, RW=0) /* output high nibble first */ outp( data&0xF0, PORTC ); enLCD(); /* output
in „suche funkt. LCD Anst. mit avr-ctrl“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
<LED_TEST); //ON OFF if(!(PINB & (1<<ON_OFF))) { //Zurzeitige ON/OFF Funktion if(systemOn == 0) { PORTC |= (1<<LED_25); systemOn = 1; }else if(systemOn == 1) { PORTC &= ~(1<<LED_25); PORTC &= ~(1<<LED_50); PORTC &= ~(1<<LED_75); PORTC &= ~(1<<LED_100); systemOn = 0; } _delay_ms(500); } //FAN Speed if(!(PIND & (1<<FAN_SPD))) { switch (fan){ case 0: PORTC &= ~(1<<LED_100); PORTC |= (1<<LED_25); fan = 1; break; case 1: PORTC &= ~(1<<LED_25); PORTC |= (1<<LED_50); fan = 2; break; case 2: PORTC &= ~(1<<LED_50); PORTC |= (1<<LED_75); fan = 3; break; case
in „Probleme mit dem Sleep Mode(ATMega328P)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DCF4.asm
stellen clr uhr_mz clr uhr_he clr uhr_hz ldi temp,0x30 ;zum ASCI erzeugen mov asci,temp ;umladen out portc,bits ;an Portc alles mit L vorbelegen ldi temp,0xff out ddrc,temp ;PortC = Ausgang ldi error,0b00000100 ; out portc,error ;PD0=1(E)+PD1=0(RS)vorbelegen inc error ;Fehler setzen out TIFR,error ;TOV0
in „DCF-Uhr auf LCD mit AVR Control“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DMX_DIMMER24___C1_Kan_1-24.bas
End If Decr Netz_pulse2 Timer_loop2: Dmx_out = Dmx_buf(11) If Netz_pulse2 <= Dmx_out Then : Reset Portc.5 : Else : Set Portc.5 : End If Dmx_out = Dmx_buf(12) If Netz_pulse2 <= Dmx_out Then : Reset Portc.4 : Else : Set Portc.4 : End If Dmx_out = Dmx_buf(13) If Netz_pulse2 <= Dmx_out Then : Reset Portc.3 : Else : Set Portc.3 : End If Dmx_out = Dmx_buf(14) If Netz_pulse2 <= Dmx_out Then : Reset Portc.2 : Else : Set Portc.2 : End If Dmx_out = Dmx_buf(15) If Netz_pulse2 <= Dmx_out Then : Reset Portc.1 : Else : Set Portc
in „DMX Demux für Dimmerpack 3Phasig in Bascom“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ZaehlerZahlenUhrvergleich.asm
b'00010101' movwf PORTC call RA3LOW return BILDF: movlw b'00010011' movwf PORTC call RA3LOW return BILDG: movlw b'00010000' movwf PORTC call RA3LOW return BILDH: movlw b'00010110' movwf PORTC call RA3LOW return BILDK: movlw
in „PIC 16F690 , ich komm da jetzt nicht weiter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
//Shiftclock auf Ausgangsposition PORTC &= ~(1<<A); //A auf Ausgangsposition } else { PORTC &= ~(1<<A); //stelle (zur Sicherheit) Datenbus auf Low PORTC |= (1<<SHIFTCLOCK); //und gibt eine Positive Flanke auf Shiftclock (Bit rutscht in den
in „Schieberegister ohne SPi“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcdstart.c
(); PORTC&= ~(1<<DB5); _delay_ms(1000); PORTC|=(1<<DB7)|(1<<DB6); //2-line mode, 5*10 dots _delay_ms(1000); toggle_EN(); _delay_ms(500); //DISPLAY ON/OFF Control PORTC=0x00; _delay_ms(1000); toggle_EN(); PORTC
in „LCD Initialisierung HILFE!!!“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Nixie_Uhr_4_1.c
PA1); } if (s == 49) { //96: R1(); set_Porta(PA1); } if ((s >= 50) && ( s < 60)) { //55: R2(); set_Portc(PC0); set_Portc(PC1); set_Portc(PC2); } if (s == 50) { //06: R1(); set_Porta(PA0); } if (s == 51) { //16: R1(); } if (s == 52) { //26: R1(); set_Porta(PA0); set_Porta(PA3); } if (s == 53) { //36: R1
in „Win AVR funktioniert nicht richtig !! Hilfe.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
config FOSC=HS #pragma config WDT=OFF void main(void) { TRISA=0; TRISB=0; TRISC=0; PORTA=0; PORTB=0; PORTC=0; while(1) { PORTA=0; PORTB=0; PORTC=0; PORTC=0b10000000; Delay10KTCYx(30); PORTC=0b01000000; Delay10KTCYx(30); PORTC=0b00100000; Delay10KTCYx(29); PORTC=0b00010000; Delay10KTCYx(27); PORTC=0b00001000; Delay10KTCYx(25); PORTC=0b00000100; Delay10KTCYx(23); PORTC=0b00000010; Delay10KTCYx(20); PORTC=0b00000001; Delay10KTCYx(16); PORTC=0; PORTB=0b10000000; Delay10KTCYx(8); PORTB=0b01000000; Delay10KTCYx(4); PORTB=0b00100000
in „ist dieser PIC kaputt?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Lite02.asm
portc,uni00 rcall sel_led7s1 ;sel s1 rcall sel_nuldev ;sel nuldev ldi uni00,dled7min ;data - out portc,uni00 rcall sel_led7s2 ;sel s2 rcall sel_nuldev ;sel nuldev ldi uni00,dled71 ;data 1 out portc,uni00
in „audio-dsp mit 8515 ?“ · Digitale Signalverarbeitung / DSP / Machine Learning ·
-
Datei
tastertolcd.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 „Quarz auf Funktionalität testen?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
K3_A9.c
DDC1); // Pin PC1 als Ausgnag konfigurieren DDRC |= (1<<DDC2); // Pin PC2 als Ausgnag konfigurieren PORTC &= ~(1<<PORTC0); //Port PC0 ausschalten PORTC &= ~(1<<PORTC0); //Port PC0 ausschalten PORTC &= ~(1<<PORTC0);// Port PC0 ausschalten DDRB &= ~(1<<DDB0); //Pin PB0 als Eingang konfigurieren DDRB &= ~
in „Interrupt Atmega 328P“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Handschalter.bas
Porta.5 Config Porta.6 = Output A6 Alias Porta.6 Config Porta.7 = Output A7 Alias Porta.7 Config Portc.0 = Output C0 Alias Portc.0 Config Portc.1 = Output C1 Alias Portc.1 Config Portc.2 = Output C2 Alias Portc.2 Config Portc.3 = Output C3 Alias Portc.3 Config Portc.4 = Output C4 Alias Portc.4 Config Portc.5 = Output C5 Alias Portc.5 Config Portc.6 = Output C6 Alias Portc.6 Config Portc.7 = Output C7 Alias Portc.7 Config Portf.0 = Output F0 Alias Portf.0 Config Portf.1 = Output F1 Alias Portf.1 Config
in „3.5" TFT-Display an Atmega128“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
3){ //D2.3 DDRC = (1 << PC1); PORTC |= (1 << PC1); } else{ DDRC = (1 << PC1); PORTC &= ~(1 << PC1); } if (minute5 == 4){ //D2.4 DDRC = (1 << PC0); PORTC |= (1 << PC0); } else{ DDRC = (1 << PC0); PORTC &= ~(1 << PC0); } if (minute5 ==
in „Fehlermeldung: definded but not used“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
3){ //D2.3 DDRC = (1 << PC1); PORTC |= (1 << PC1); } else{ DDRC = (1 << PC1); PORTC &= ~(1 << PC1); } if (minute5 == 4){ //D2.4 DDRC = (1 << PC0); PORTC |= (1 << PC0); } else{ DDRC = (1 << PC0); PORTC &= ~(1 << PC0); } if (minute5 ==
in „timer und prscaler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
programm.c
20); while (ADCSR.4==0); ADCSR.4=1; return ADCW; } void pause(void) { #asm nop nop #endasm } void PORTC_output(void) { DDRC = 0xFF; PORTC = 0; } void PORTC_input(void) { DDRC = 0x00; PORTC = 0xFF; } void autoreset(void) { PORTC = 0xB2; pause(); wr = 0; pause(); wr = 1; } void autowrite(void) { PORTC
in „Hilfe zu AD-Wandler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
keks.c
include <stdio.h> #include "uart.h" /* 9600 baud */ #define UART_BAUD_RATE 2400 void Schalter1 (void) { PORTC &= ~(1<<PORTC0); // Bit 0 loeschen, LED an _delay_ms(2000); PORTC |= (1 << PORTC0); // Bit 0 setzen, LED aus uart_putc ('1'); } void Schalter2 (void) { PORTC &= ~(1<<PORTC1); // Bit 0 loeschen, LED
in „Interrupts in Assembler und C“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TMLCD.bas
20 ' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 'GND +5V DI RS RW E Databyte-> Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E = Porta.7 , Rs = Porta.5 'These settings are for the AVR-Ctrl in PIN mode Config Lcd = 16 * 2 'configure lcd screen 'other options are 16 * 4 and
in „Pollin L404200J00A über Mega8“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lauflicht2_atmega8_Pollinaddon_2.bas
Initlcd Cls Locate 1 , 1 Lcd "Hallo Lauflicht" Wait 1 Locate 2 , 1 Lcd "Nur ein Test" Wait 2 Cls Set Portc.2 Waitms 100 Set Portc.3 Waitms 100 Set Portc.4 Waitms 100 Set Portc.5 Waitms 100 Set Portd.3 Waitms 100 Set Portd.4 Waitms 100 Set Portd.5 Waitms 100 Set Portd.6 Waitms 300 Reset Portc.2 Waitms 100 Reset Portc.3 Waitms 100 Reset Portc.4 Waitms 100 Reset Portc.5 Waitms 100 Reset Portd.3 Waitms 100 Reset Portd.4 Waitms 100 Reset Portd.5 Waitms 100 Reset Portd.6 Waitms 100 Loop End
in „pollin programmer+addon board lcd ansteuerung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
GPSSystem2.bas
portb.6|------>--------|RW | | | + '+ | portb.7|------>--------|ID | | | + '+ | | | | | | + '+ | portc.0|------<>-------|DAT0 | | | + '+ | portc.1|------<>-------|DAT1 | | | + '+ | portc.2|------<>-------|DAT2 | | | + '+ | portc.3|------<>-------|DAT3 | | | + '+ | portc.4|------<>-------|DAT4 | | | + '+ | portc.5|------<>-------|DAT5 | | | + '+ | portc.6|------<>-------|DAT6 |________________| | + '+ | portc.7|------<>-------|DAT7 | + '+ |________________| |________________________| + '+ + '+ Display + '+
in „KS0108B Displaytech 64128A“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Balkon.bas
Output 'Konfiguriert PortA als Ausgang Config Portb = Input 'Konfiguriert PortB als Eingang Config Portc = Output 'Konfiguriert PortC als Ausgang Config Portd = Output 'Konfiguriert PortD als Ausgang Dim Tast1 As Byte 'Konfiguration der Tastaturen Variablen Dim Tast2 As Byte 'Konfiguration der Tastaturen
in „KS0066 mit 4Bit ansteuerung?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Adventskalender.c
= 14) { PORTB |= (1<<PB6); } if(Zufallszahl == 15) { PORTB |= (1<<PB7); } if(Zufallszahl == 16) { PORTC |= (1<<PC0); } if(Zufallszahl == 17) { PORTC |= (1<<PC1); } if(Zufallszahl == 18) { PORTC |= (1<<PC2); } if(Zufallszahl == 19) { PORTC |= (1<<PC3); } if(Zufallszahl == 20) { PORTC |= (1<<PC4); } if(Zufallszahl == 21) { PORTC |= (1<<PC5); } if(Zufallszahl == 22) { PORTC |= (1<<PC6); } if(Zufallszahl == 23) { PORTC |= (1<<PC7); } Zustand = 1; sei(); } //Zurück case 3: { //hier weiter machen //Notlösung; Zurück gibts noch
in „AVR GCC Problem mit Optimierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd-routines.h
port,pin) ((*(volatile struct bits*)&port).b##pin) #define SBIT(x,y) SBIT_(x,y) #define LCD_D4 SBIT( PORTC.OUT, 0 ) #define LCD_DDR_D4 SBIT( PORTC.DIR, 0 ) #define LCD_D5 SBIT( PORTC.OUT, 1 ) #define LCD_DDR_D5 SBIT( PORTC.DIR, 1 ) #define LCD_D6 SBIT( PORTC.OUT, 2 ) #define LCD_DDR_D6 SBIT( PORTC.DIR, 2 ) #define LCD_D7 SBIT( PORTC.OUT, 3 ) #define LCD_DDR_D7 SBIT( PORTC.DIR, 3 ) #define LCD_RS SBIT( PORTC.OUT, 4 ) #define LCD_DDR_RS SBIT( PORTC.DIR, 4 ) #define LCD_E0 SBIT( PORTC.OUT, 5 ) #define LCD_DDR_E0 SBIT( PORTC.DIR,
in „LCD Ansteuerung error“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
thermo.cpp
void) { init(); //! Auf verschiedene PORTs aufpassen while(1) { PORTE=7; delay100ms(10); PORTD=31; PORTC=255; delay100ms(10); //Ausgaben an PORTC,D,E als Hardwaretest switch (PORTA) { case 0:PORTD=1;PORTC=50;delay100ms(10);break; case 1:PORTD=2;PORTC=50;delay100ms(10);break; case 2:PORTD=4;PORTC=50;delay100ms(10);break; case 3:PORTD=8;PORTC=50;delay100ms(10);break; case 4:PORTD=16;PORTC=50;delay100ms(10);break; case 5:PORTD=3;PORTC=50;delay100ms(10);break; case 6:PORTD=7;PORTC=50;delay100ms(10);break; case 7:PORTD=15;PORTC=50;delay100ms
in „PORTA als analoger Input (PIC16F887)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
thermo.cpp
1:PORTD=2;PORTC=50;delay100ms(10);break; case 2:PORTD=4;PORTC=50;delay100ms(10);break; case 3:PORTD=8;PORTC=50;delay100ms(10);break; case 4:PORTD=16;PORTC=50;delay100ms(10);break; case 5:PORTD=3;PORTC=50;delay100ms(10);break; case 6:PORTD=7;PORTC=50;delay100ms(10);break; case 7:PORTD=15;PORTC=50;delay100ms(10);break; default:PORTD=21;PORTC=50;delay100ms(10);break; } } } void init(void) { ANSEL = 0x00; // PORT digital schalten delay2ms(1); ANSELH
in „PORTA als analoger Input (PIC16F887)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
TIMER1_COMPA_vect) { static int Nummer = 5; switch(Nummer) { case 2: PORTD = anzwert[zeiger[Nummer]]; PORTC |= (1<<PC5); PORTC &= ~( (1<<PC3) | (1<<PC2) | (1<<PC4)); Nummer = 5; break; case 3: PORTD = anzwert[zeiger[Nummer]]; PORTC |= (1<<PC4); PORTC &= ~( (1<<PC3) | (1<<PC2) | (1<<PC5)); Nummer--; break; case 4: PORTD = anzwert[zeiger[Nummer]]; PORTD &= ~(1<<PD7); PORTC |= (1<<PC3); PORTC &= ~( (1<<PC2) | (1<<PC4) | (1<<PC5)); Nummer--; break; case 5: PORTD = anzwert[zeiger[Nummer]]; PORTC |= (1<<PC2); PORTC &= ~( (1<<PC3) | (1<<PC4) | (1<<PC5)); Nummer--; break;
in „Controllerprobleme / Programm Atmega 8, WTV020“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.asm
ein3: sbi portc,1 cpi subcount,50 breq aus3 aus3: cbi portc,1 rjmp weiter3 dimm4: cpi subcount,20 breq ein4 ein4: sbi portc,1 cpi subcount,70 breq aus4 aus4: cbi portc,1 rjmp weiter3 dimm5: cpi subcount,10 breq ein5 ein5: sbi portc,1 cpi subcount,30 breq aus5 aus5: cbi portc,1 rjmp weiter3 dimm6: cpi subcount,5 breq ein6 ein6: sbi portc,1 cpi subcount,50 breq aus6 aus6: cbi portc,1 rjmp weiter3 weiter3: cpi SubCount, 200 ; ist
in „Uhr und Dimmen mit Timer 1 Atmega8 gleichzeitig“ · Mikrocontroller und Digitale Elektronik ·