-
Datei
Sternetest.c
dimm8-acht; ocr8=dimm8>>10; } } ISR (TIMER2_OVF_vect) { pause=pause+1; switch (pause) { case 1: { PORTC=0b11111110; OCR2=ocr1; break; } case 3: { PORTC=0b11111101; OCR2=ocr2; break; } case 5: { PORTC=0b11111011; OCR2=ocr3; break; } case 7: { PORTC=0b11110111; OCR2=ocr4; break; } case 9: { PORTC=0b11101111; OCR2=ocr5; break; } case 11: { PORTC=0b11011111; OCR2=ocr6; break; } case 13: { PORTC=0b10111111; OCR2=ocr7; break; } case 15: { PORTC=0b01111111; OCR2=ocr8; pause=0; break; } default: PORTC=0xFF; break; } }
in „Denkfehler in der ISR Routine vom Timer2? Atmega8“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DMX-TEST-2.asm
UCSRB, r16 ldi r16, 0b10000110 out UCSRC, r16 sbi PORTC, 3 cbi PORTC, 4 clr r17 sts $0067, r17 sts $0068, r17 ldi XL, LOW (2) ldi XH, HIGH(2) ldi r16, 3 sts $0069, r16 clr r16 sts $006A, r16 clr r22 sei ;------------------Hauptprog------------------ haupt
in „UART DMX Empfangsproblem (Assembler)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
taster.c
tuerlinkstastertime = 0; tuerlinkstasterset = 1; } tuerlinkstastertimer = 3; tuerlinkstasterstrom = 1; PORTC |= (1<<PC5); _delay_ms(300); PORTC &= ~ (1<<PC5); tuerlinkstasterstrom = 0; tuerlinkstasterstatus = 1; } } if (tuerlinkstaster == 2) { if (tuerlinkstasterstatus == 2) {} else { if (tuerlinkstasterset
in „Probleme beim Code“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
code.txt
unsigned int menu = 0; char wert; void Write_LCD_Init (u08 data) { // Hier alles auf Default outp(0x40, PORTC); // Hier wird der LCD_LE1&2 hochgezogen if (enlcdctl & 0x01) outp(0xC0, PORTC); if (enlcdctl & 0x02) outp(0x40, PORTD); outp(0xff, DDRA); outp(data, PORTA); // Hier wieder runter outp(0x40, PORTC)
in „Problem mit ADC MCP3204 und Atmega 8515“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
empfangsmodul.c
if(TC==0) // If no Information has been recived, add one minute to the clock vFNext_Minute(); cbi(PORTC,2); cbi(PORTC,3); // Ensure that no Voltage is applied to the clock outp((0<<OCIE1A),TIMSK); sleep_mode(); // set mcu ro power down mode } */ int main(void) { initialisierung(); //sleep_mode(); while
-
Datei
blink.c
1,1,1,1,0,1,1,0, 0,1,0,1,1,1,0,0, 0,1,1,1,1,1,0,0, 0,0,1,1,1,0,0,0 }; int i; sbi(DDRC,PC7); // Pin 7 PortC Output sbi(DDRC,PC6); // Pin 6 PortC Output while (1) { /* for(i=0;i<9*8;i++){ if (gfx[i]){ cbi(PORTC,PC6); } else { sbi(PORTC,PC6); } clockleds(); } */ for(i=0;i<4*8;i++){ cbi(PORTC,PC6); clockleds(); } for(i=0;i<5*8;i++){ cbi(PORTC,PC6); clockleds(); } delay_ms(5000); } }
in „4094 LED Display flackern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Eigener_Driver4.bas
byval Command1 As Byte , Byval Data1 As Byte) Call Waitifbusy cbi cntport, Rs 'Instruction Schreiben Portc = Command1 cbi cntport, E Call Waitifbusy 'Bit Set Register Schreiben Portc = Data1 cbi cntport , E End Sub Sub Waitifbusy() 'Busy Checken Config Portc = Input cbi cntport , Rw cbi cntport , Rs Do cbi cntport , E If Pinc.7 = 0 Then Exit Do End If sbi cntport , E Loop Config Portc = Output Portd = &HFF End Sub Sub Writechar() Call Waitifbusy cbi cntport,Rs Portc = &B11110011 cbi cntport,E Call Waitifbusy Portc = &B10101111 cbi cntport,E sbi cntport,E End Sub
in „HD61830 und ATMEL“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Comport-Final.bas
= 255 - Val(temp) temp = Mid(Empfang,10,3) Kanal4 = 255 - Val(temp) End Interrupt Sub Schalten() PORTC = 255 Compare1=291 If Kanal1 = Durchlauf Then Reset PORTC.0 If Kanal2 = Durchlauf Then Reset PORTC.1 If Kanal3 = Durchlauf Then Reset PORTC.2 If Kanal4 = Durchlauf Then Reset PORTC.3 Durchlauf = Durchlauf + 1 If Durchlauf = 255 Then PORTC = 255 Stop Timer1 End If End Sub
in „DMX Dimmerpack bauen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lichtersteuerung.c
} void setup(void){ //INT0 auf toogle interrupt MCUCR = 0x01; //INT0 enable GICR |= (1<<INT0); //PORTC als Ausgang DDRC = 0xFF; PORTC = 0; //Timer0 einstellen //Prescaler 256 -> 1ms an -> 62,5 in TCNT0 also TCCR0 0 0x04; TCCR0 = 0x00; //Hier aus TCNT0 = 0; //Timer1 einstellen, Taktgen für Blinksignale
in „Timer Läuft im Sim - Aber nicht in real?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
alf.c
2048[UDR]; } if (rx_counter == 8) { bCh2Blue = gammaCurveInt22_2048[UDR]; } if (rx_counter == 9) { PORTC.0 = 0; bCh3Blue = gammaCurveInt22_2048[UDR]; rx_counter = 0; } } if (loopCounter == bCh1Red) { PORTC.3=0; } if (loopCounter == bCh2Red) { PORTC.6=0; } if (loopCounter == bCh3Red) { PORTA.4=0; } if (loopCounter == bCh1Green) { PORTC.2=0; } if (loopCounter == bCh2Green) { PORTC.5=0; } if (loopCounter == bCh3Green) { PORTA.5=0; } if (loopCounter == bCh1Blue) { PORTC.1=0; } if (loopCounter == bCh2Blue) { PORTC.4=0; } if (loopCounter
in „12bit, 9-Kanal Soft-PWM für LEDs auf Mega16“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rfm12_rx.c
AFC_EN); /* enable offset calculation */ } int main(void) { ioinit(); radio_init(); /* LED test */ PORTC |= _BV(LED0); _delay_ms(500); PORTC |= _BV(LED1); _delay_ms(500); PORTC |= _BV(LED2); _delay_ms(500); PORTC |= _BV(LED3); _delay_ms(500); PORTC &= ~(_BV(LED0) | _BV(LED1) | _BV(LED2) | _BV(LED3));
in „Problem AM-Empfänger konstruieren“ · HF, Funk und Felder ·
-
PDF
rpc_f_2.pdf
WAIT_RQ2 IN_LP2 LDAB PORTC ANDB #%01111111 ;FORCE RX-ACCEPT TO GO LOW STAB PORTC WAIT_RQ3 LDAB PORTC ;WAIT FOR RX-REQUEST TO GO HIGH BITB #%01000000 BEQ WAIT_RQ3 DAT_IN2 LDAA PORTC ;READ IN DATA ANDA #%00001111 ASLA ASLA ASLA
in „Problem mit BIM2 und RPC Funkübertragung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
(received == 0x61) { received = 0; //send_string("a"); PORTD &= ~(1 << PD2); PORTD |= (1 << PD1); PORTC &= ~(1 << PC4); PORTC &= ~(1 << PC5); } if (received == 0x62) { received = 0; //send_string("b"); PORTD &= ~(1 << PD2); PORTD &= ~(1 << PD1); PORTC |= (1 << PC4); PORTC &= ~(1 << PC5); } if (received == 0x63) { received = 0; //send_string("c"); PORTD &= ~(1 << PD2); PORTD &= ~(1 << PD1); PORTC &= ~(1 << PC4); PORTC |= (1 << PC5); } if (received == 0x64) { received = 0; //send_string("d"); PORTD |= (1 << PD2); PORTD &= ~(1 << PD1); PORTC &= ~(1 << PC4); PORTC &= ~(1 << PC5); } } return 1;
in „UART RX funktioniert nach Abschalten von TX nicht mehr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
lcd_init(LCD_DISP_ON); lcd_clrscr(); lcd_puts("TEST"); //Schleife while (1) { while(taster1==0) { PORTC &= ~LEDGRUEN; PORTC &= ~LEDGELB; PORTC &= ~LEDROT; PORTC &= ~LEDLILA; } while(taster1==1) { PORTC |= LEDGRUEN; PORTC |= LEDGELB; PORTC |= LEDROT; PORTC |= LEDLILA; } while(taster1==2) { led(); } }
in „LCD-Display Problem“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DMX_Dimmer8_V1.bas
Config Int0 = Rising Enable Timer0 On Timer0 Dimmer_output_sample Timer0 = 0 Start Timer0 Config Portc = Output Config Portb = Output Set Portc.5 Set Portc.4 Dmx_count = 0 Dmx_clock = 32 Dmx_adr = 2 Enable Interrupts ' ****************************************************************************** '
in „DMX Dimmerpack bauen“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
SAA1057_PLL_Driver.pdf
zmienna obliczeń częstotliwości Dim Pokazanaff As String * 10 ' Dim Pokazanafstr As String * 10 ' Portc.0 = 1 ' Portc.1 = 1 ' Podswietlanie Alias Portc.2 'alias dla wyjścia podświetlania Reset Podswietlanie 'włączenie podświetlania Dat Alias Portc.5 'aliasy dla SPI Enalbe_ Alias Portc.4 ' Clok Alias
in „SAA1057 in Bascom Ansteuern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
termo.asm
movwf s_copy ; movf PCLATH, W movwf p_copy clrf PCLATH ; Bank 0 ; Intrupt servic routine Int_serv bsf PORTC, 2 ; Ziffer1 aus bsf PORTC, 1 ; Ziffer2 aus bsf PORTC, 0 ; Ziffer3 aus decf Digit,f ; Ziffernzähler verringern ;Digit=2: anzeigen Ziffer 3 1er ;Digit=1: anzeigen Ziffer 2 10er ;Digit=0: anzeigen Ziffer
in „Hilfe Programm“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TestCJS.asm
;LCD bereit? ldi temp1,0b11111111 ;RB ist Ausgang out DDRB,temp1 sbi PORTC,CS1 sbi PORTC,CS2 cbi PORTD,RS ;Befehl wird gesendet cbi PORTD,RW ;LCD in Schreibmodus sbi PORTD,E ;spreche LCD an out PORTB,buffer ;sende Befehl cbi PORTD,E ;disable LCD ret RESET: ldi temp1,LOW(RAMEND
in „Pollin Display TG12864B-03“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
freq_mess.bas
------------------------------------ 'name : Ledblink 'param Counts: Byte : the number of blinks, Portc should do 'param Freq : Byte : blink frequency ' LED is flashing for a half period ' 'This function is an easy routine to let a LED blink at Portc '-------------------------------------------------
in „Wasserstandmessung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
*********************************** if ((impuls > 1000) & (impuls < 4000)) { if (impuls < 1526) { PORTC |= (1<<PC3); //Bit3 auf High setzen PORTC &= ~(1<<PC4); } if (impuls > 3052) { PORTC |= (1<<PC4); //Bit4 auf High setzen PORTC &= ~(1<<PC3); } if ((impuls > 1560) & (impuls < 3000)) { PORTC &= ~(1<<PC4); //Bit4 auf Low setzen PORTC &= ~(1<<PC3); //Bit3 auf Low setzen } } else { PORTC &= ~(1<<PC4); //Bit4 auf Low setzen PORTC &= ~(1<<PC3); //Bit3 auf Low setzen } //**************************************************************
in „Servos durch µC ersetzten“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Uhr-Test.bas
m32def.dat" $crystal = 16000000 $swstack = 50 $hwstack = 50 $framesize = 50 Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , _ Db7 = Portc.7 , E = Portc.3 , Rs = Portc.2 Config Lcd = 16 * 2 Cls Cursor Off Config Sda = Portc.1 Config Scl = Portc.0 I2cinit Dim Wochentag As Byte Dim Tag As
in „DS1307 - Display flackert“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Buffer.c
_t tmpindex_read = index_read; if(Buffer[tmpindex_read].x_dir != Buffer[tmpindex_read - 1].x_dir) PORTC ^= (1<<3); if(Buffer[tmpindex_read].y_dir != Buffer[tmpindex_read - 1].y_dir) PORTC ^= (1<<4); if(Buffer[tmpindex_read].z_dir != Buffer[tmpindex_read - 1].z_dir) PORTC ^= (1<<5); PORTC &= ~(Buffer[tmpindex_read].x_axis<<0);//start step PORTC &= ~(Buffer[tmpindex_read].y_axis<<1); PORTC &= ~(Buffer[tmpindex_read].z_axis<<2); _delay_us(4); PORTC |= (1<<0); //end step PORTC |= (1<<1); PORTC |= (1<<2); Buffer[tmpindex_read].sensor_answer =
in „Interrupt Fehlerquellen - FIFO Buffer“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
LED_MASK (0xe0) //MACROS #define ad0_strobe() PORTB |= AD0_EN; PORTB &= ~AD0_EN #define ad1_strobe() PORTC |= AD1_EN; PORTC &= ~AD1_EN #define sr_strobe() PORTC |= SR_EN; PORTC &= ~SR_EN #define we_strobe() PORTC &= ~WE; PORTC |= WE #define sck_strobe() PORTB |= S_SCK; PORTB &= ~S_SCK #define sd_true()
in „Byte seriell ausgeben“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
3._RS232_Senden_Empfangen_Interrupt.pdf
: PWert2 = 00000011 out PORTB , PWert1 ; OUT - Output register to I/O port : PORTB = --001110 out PORTC , PWert2 ; OUT - Output register to I/O port : PORTC = --000011 sbi PORTC , 2 ; SBI - Set bits in I/O Register : C.2 = 1 RS232_Senden_Empfangen_Interrupt 4 von 7 04.12.2011 cbi PORTC , 3 ; CBI - Clear
in „ATmega8 und Sensoren per VB 2010 auswerten“ · Softwareentwicklung ·
-
Datei
ForumsPost.txt
PortA SW5 für "fahre 1cm auf" * PortA SW6 für "fahre 10cm ab" * PortA SW7 für "fahre 10cm auf" * * PortC P0 für Signal an den Motor "auf" * PortC P1 für Signal an den Motor "ab" * PortB P0 Eingang für das TaktSignal des HallSensor1 (20Pulse/3mm; 0,15mm/Puls) * möglich wären 40Pulse/3mm; 0,075mm/Puls wenn
in „Probleme bei der Usart initialisierung mit dem ATmega8515“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
testaufbau.asm
PORTD, 1 bcf PORTD, 0 return INIT_LCD bsf STATUS, RP0 movlw B'00000000' movwf TRISC ; Alle Pins von PortC I/O bcf STATUS, RP0 clrf PORTC ; Alle Pins von PortC sind Ausgänge bcf RW bcf RS bcf ENABLE movlw D'250' movwf ZEIT call WAIT_1ms ; mindestens 15ms auf ende des internen reset warten (hier 20ms) decfsz
in „LCD an PIC16F877“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Board_Mono_PWM_3.c
CTC match { /***************** PWM **********************/ // if(PINC & (1<<PINC0)){PORTC |=(1<<PC1); PORTC &=~(1<<PC0);} // else{PORTC |=(1<<PC0); PORTC &=~(1<<PC1);} itoa( pwm_cnt, puffer, 10 ); // Umwandeln der Zahl i; 10 fuer radix -> Dezimalsystem uart_puts( puffer ); uart_puts("\n"); if(pwm_soll > pwm_cnt) // solange der Sollwert größer als der Zählerstand ist-> LED an {PORTC |=(1<<PC1);} else {uart_puts("\n else"); PORTC &=~(1<<PC1);} // wenn nicht, LED aus if (pwm_cnt==(uint8_t)(254)) // pwm_counter hochzählen und bei Überlauf wieder rücksetzen {pwm_cnt=0;} else {pwm_cnt
in „Timerproblem bei PWM nach Tutorial „SOFT-PWM“ ( Atmega8)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Programm_chillxx.txt
up an Pind PD0 bis PD1 aktiviert //Referenzfahrt - Deckel schließen PORTC &= ~(1<<PC0); //rücksetze Motor AUF, falls er aktiv wäre _delay_ms (100); PORTC |= (1<<PC1); //setze Motor AB if (!(PIND & (1<<PD2))) //wenn Eingang S2 (Schalter unten) geschaltet=0 (wegen internem
in „ATMEGA8 in C: 1 Tastendruck --> 2 verschiedene Funktionen -->Hilfe!“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
8_bit_Read_MMA.bas
default use 10 for the SW stack $framesize = 40 ' default use 40 for the frame space 'I/Os Config Portc.0 = Output 'Status-Led Led Alias Portc.0 Config Portc.2 = Output 'DE des RS485-Treibers De Alias Portc.2 Config Portc.3 = Output 'RE/ des RS485 Treibers Re_inv Alias Portc.3 Config Sda = Portc.4 'I2C I/Os Config Scl = Portc.5 Config Twi = 400000 I2cinit 'Var Dim Mma_8451q_read As Byte Dim Mma_8451q_write As Byte Dim Gyro_stat As Byte Dim X_8 As Byte Dim Info As Byte '$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$##Init##$$$$$$
in „MMA8451Q ansteuern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Timer4.c
ISR(TIMER2_COMPA_vect) { //Erstes Signal { if(Count_Servo1 <= 17 ){ if(NrOverflow_Servo1 % 2 == 0) PORTC &= ~(1 << PC0); else {PORTC |= (1 << PC0);} NrOverflow_Servo1++; if( NrOverflow_Servo1 == sizeof(Array_Servo1) / sizeof(unsigned char) ) NrOverflow_Servo1 = 0; OCR2A = Array_Servo1[ NrOverflow_Servo1]; // Den Timer damit laden } else {PORTC |= (1 << PC0);} } //Zweits Signal { if((Count_Servo2 >= 18) && (Count_Servo2 <= 34)){ if(NrOverflow_Servo2 % 2 == 0) PORTC &= ~(1 << PC4); else {PORTC |= (1 << PC4);} NrOverflow_Servo2++; if( NrOverflow_Servo2
in „Timer stören sich gegenseitig“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
input_test.bas
Dim Belegt As Bit '1 wenn EAN-Code im Speicher Dim I As Byte 'Zählervariable Dim Sps As Bit Config Portc.2 = Output 'Anzeige Übernahmesignal von SPS Config Portc.3 = Output 'Ausgabe Morsezeichen Config Portc.0 = Input 'Port auf Eingang geschaltet Freigabe von der SPS Portc.0 = 1 'Pull-Up Pin C.0 eingeschaltet Lbelegt Alias Portc.1 'Alias-Vergabe Lsps Alias Portc.2 Ean = 0 'String für EAN-Code auf 0 setzen Belegt = 0 'Variable für belegt-Anzeige auf 0 setzen Waitms 500 'Wartezeit für LCD Cls 'LCD löschen Do If Ean = 0 Then
in „Mega8, Bascom, RS232-Eingabe funzt nur einmal“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
pic16f877a.h
_PORTC_RC1_SIZE 0x1 #define _PORTC_RC1_LENGTH 0x1 #define _PORTC_RC1_MASK 0x2 #define _PORTC_RC2_POSN 0x2 #define _PORTC_RC2_POSITION 0x2 #define _PORTC_RC2_SIZE 0x1 #define _PORTC_RC2_LENGTH 0x1 #define _PORTC_RC2_MASK 0x4 #define _PORTC_RC3_POSN 0x3 #define _PORTC_RC3_POSITION 0x3 #define _PORTC_RC3_SIZE 0x1 #define _PORTC_RC3_LENGTH 0x1 #define _PORTC_RC3_MASK 0x8 #define _PORTC_RC4_POSN 0x4 #define _PORTC_RC4
in „HEX-Datei erstellen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
RNCtrl.c
uint8_t n) {PORTB |= (1<<n);} //set PORTB.n high static inline void setportcon(const uint8_t n) {PORTC |= (1<<n);} //set PORTC.n high static inline void setportdon(const uint8_t n) {PORTD |= (1<<n);} //set PORTD.n high //Ports auf LOW setzen static inline void setportaoff(const uint8_t n) {PORTA &=
in „Mikrocontrollerprogrammierung mit Ubuntu (AVRISPmkII/ATMega32)“ · 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
test.c.c
3; // Init. Sequenz, Referenz LCD Datenblatt do // Init cycle 3x { PORTC |= ((1 << PC5) | (1 << PC4)); // DB4, DB5 = 1 for (i=0; i<1000; i++) ; //_delay_ms(4.1); }while (--n); PORTC = 0x38; // 8 Bit, 2 Zeilen E_toggle(); PORTC = 0x0C; // Display an, Cursor aus, Blinken aus E_toggle(); PORTC = 0x01; // Display Clear E_toggle(); PORTC = 0x04; // Entry Mode Set, Cursor links, no Shift E_toggle(); PORTC = 0x02; // Cursor home } int main (void) { uint16_t i; DDRB |= ((1 << PB2) | (1 << PB3
in „LCD Ansteuerung in C / Startprobleme“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
072.c
char #define uint unsigned int //#define SOFT_SPI 1 #ifndef SOFT_SPI void DAC_ChipSelect(void) { PORTC &= ~(1<<0); } void DAC_ChipDeselect(void) { PORTC |= 1<<0; } #endif void PortInit(void) { #ifdef SOFT_SPI /* Software spi */ DDRC = 0x07; #else #define DD_MOSI 3 #define DD_SCK 5 /* Hardware spi */
in „ATMega48 als SPI-Master.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD.bas
-------------------------------------------------------- 'Schieberegister gemeinsam Sr_load Alias Portc.1 : Config Sr_load = Output Sr_data Alias Portc.0 : Config Sr_data = Output 'Schieberegister LED Led_clock Alias Portc.4 : Config Led_clock = Output Dim Leds As Byte : Leds = &B0000_0100 Dim Direction
in „c't-Bot Display ansteuern mit BASCOM“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LCD_INIT.txt
CLEAR_BIT(PORTA, PINA6); //RS=0 Daten werden als Befehl interpretiert PORTA|=(1<<PINA5); //setzt E PORTC=0b10000010; // 10 PORTA&=~(1<<PINA5); //übernahme der Daten E löschen } //---------------------CALL LCD INIT----------------------- void LCD_INIT (void) { //Function Set 1 PORTA&=~(1<<PINA7); //RW=
in „LCD 4x20 DDRAM Adresse S6A0069“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
t6963v3.bas
used in this demo 'LCD pin connected to ' 1 GND GND '2 GND GND '3 +5V +5V '4 -9V -9V potmeter '5 /WR PORTC.0 '6 /RD PORTC.1 '7 /CE PORTC.2 '8 C/D PORTC.3 '9 NC not conneted '10 RESET PORTC.4 '11-18 D0-D7 PA '19 FS PORTC.5 '20 NC not connected $crystal = 8000000 'First we define that we use a graphic LCD Config Graphlcd = 240 * 128 , Dataport = Porta , Controlport = Portc , Ce = 2 , Cd = 3 , Wr = 0 , Rd = 1 , Reset = 4 , Fs = 5 , Mode = 8 'The dataport is the portname that is connected to the data lines of the LCD 'The controlport is the portname which pins are used
in „Pinbelegung T6963C In Bascom-AVR Demo Prog“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd-routines.asm
RS zu setzen mov temp2, temp1 swap temp1 andi temp1, 0b00001111 out PORTC, temp1 rcall lcd_enable andi temp2, 0b00001111 out PORTC, temp2 rcall lcd_enable rcall delay50us ret ;erzeugt den Enable-Puls lcd_enable: sbi PORTC, 5 ;Enable high nop ;3 Taktzyklen warten nop nop
in „Problem: nur senkrechte Striche auf LCD“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
iPod_NF_remote.c
interne referenzspannung auf AIN0 verwenden while(!(ACSR & (1<<ACO))) // auf fallende flanke warten { PORTC &= ~(1<<LED0);_delay_ms(100); // LED blinkt solange bis die Fallende Flanke kommt PORTC |= (1<<LED0);_delay_ms(100); } _delay_ms(4.1); PORTC |= (1<<PULDOWN); // pulldown einschalten _delay_ms(4.2);
in „iPod über NF-Eingang steuern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SHIFTOUT_Test.bas
$regfile "m48def.dat" $crystal = 10000000 $baud = 9600 Config Portc = Output Clock_out Alias Portc.3 'Clockausgang Ser_out Alias Portc.4 'Signalausgang Dim Var As Byte Var = 137 Wait 1 sbi portc,5 Waitms 100 cbi portc,5 Shiftout Ser_out , Clock_out , Var , 0 sbi portc,5 Waitms 100 cbi portc,5 End 'end program
in „SHIFTOUT- Befehl in Bascom geht nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
motor_control.c
define LED3 PC3 #define LED4 PC4 #define LED5 PC5 #define LED6 PC6 #define LED7 PC7 #define TGLED0() PORTC ^= _BV(LED0) #define TGLED1() PORTC ^= _BV(LED1) #define TGLED2() PORTC ^= _BV(LED2) #define TGLED3() PORTC ^= _BV(LED3) #define TGLED4() PORTC ^= _BV(LED4) #define TGLED5() PORTC ^= _BV(LED5) #define TGLED6() PORTC ^= _BV(LED6) #define TGLED7() PORTC ^= _BV(LED7) #define ON 1 #define OFF 0 #define CW 1 #define CCW 0 #define ALL8 0xFF //Macro to set entire register #define POWERLEVEL_FULL 0xFF #define POWERLEVEL_HALF
in „ATmega162 springt nicht in (SIG_OVERFLOW0)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
testaufbau.asm
PORTD, 1 bcf PORTD, 0 return INIT_LCD bsf STATUS, RP0 movlw B'00000000' movwf TRISC ; Alle Pins von PortC I/O bcf STATUS, RP0 clrf PORTC ; Alle Pins von PortC sind Ausgänge bcf RW bcf RS bcf ENABLE movlw D'250' movwf ZEIT delay1 call WAIT_1ms ; mindestens 15ms auf ende des internen reset warten (hier 20ms
in „LCD am PIC 16F877“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main_program.c
********* SchieberegisterEntleeren(); Temperatur_Init(); UART_Init(); Uhrzeit_Init(); PWM_Init(); PORTC |= (1<<PC5); _delay_ms(500); PORTC &=~ (1<<PC5); _delay_ms(500); PORTC |= (1<<PC5); _delay_ms(500); PORTC &=~ (1<<PC5); LEDReihe[0] = 0b00000000; LEDReihe[1] = 0b11111110; LEDReihe[2] = 0b00010000;
in „Controller kann Funktionen in anderen Files manchmal nicht aufrufen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rfm12_hand.asm
Eingang Takt für µC (PIN9) ;cbi DDRC, 0 ; ADC -> Versorgungsspannung sbi DDRC, 1 ; Ausgang LED sbi PORTC, 1 cbi DDRC, 2 ; Eingang Taster1 cbi DDRC, 3 ; Eingang Taster2 cbi DDRC, 4 ; Eingang Taster3 cbi DDRC, 5 ; Eingang Taster4 sbi PORTC,2 sbi PORTC,3 sbi PORTC,4 sbi PORTC,5 ; Pull-Ups an ldi temp1, 0xbf
in „RFM12 Statusabfrage“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Test_delay.c
PINC7 // PORTC Bit PC7 #define SW_FREQ_DOWN PINC6 // PORTC Bit PC6 #define SW_DUTYCYCLE_UP PINC5 // PORTC Bit PC5 #define SW_DUTYCYCLE_DOWN PINC4 // PORTC Bit PC4 #define SW_AMPLITUDE_UP PINC3 // PORTC Bit PC3 #define SW_AMPLITUDE_DOWN PINC2 // PORTC Bit PC2 #define SW_Ttot_UP PINC1 // PORTC Bit PC1 #define SW_Ttot_DOWN PINC0 // PORTC Bit PC0 #define SW_Mode PIND0 // PORTD Bit PD0 #define OUT_A PIND4 // PORTD Bit PD4 #define OUT_A__b PIND5 // PORTD
in „Atmega delay mit globalen Variablen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
default_ic2.h
Input -> 1 ICSP #define PB7x PORTB7 // Input -> 1 ICSP //Zuweisung PORT_C - PWM,SPI,TX/RX #define PORTC_CONFIGBYTE 0x9F #define PC0x PORTC0 // Input -> 1 nc #define PC1x PORTC1 // Input -> 1 PWM LCD (zunächst Input lt. Datenblatt) #define PC2x PORTC2 // Input -> 1 nc #define PC3x PORTC3 // Input -> 1 SCK: SPI CLK #define PC4x PORTC4 // Input -> 1 SDI: SPI 1 TO 2 (Daten von IC1) #define PC5x PORTC5 // Output -> 0 SDO: SPI DO #define PC6x PORTC6 // Output -> 0 TX-2 #define PC7x PORTC7 // Input -> 1 RX-2 //Zuweisung PORT_D - LCD
in „PIC16 Segmentdisplay“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LED_Cube_Ausgabe.txt
ISR (TIMER0_OVF_vect) { if (i==1) { PORTC = 0; // PORTC: Ebenen PORTD = PORTB = 0; // PORTD und PORTB: Spalten PORTC = (1<<PC0); } else if (i==2) { PORTC = 0; PORTD = PORTB = 0; PORTC = (1<<PC1); } else if (i==3) { PORTC = 0; PORTD = PORTB = 1; PORTC = (1<<PC2); } i++; if (i==4) i=1; }
in „LED Cube Multiplexing mit Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
geeky_dmx.asm
Enable WR sbi PORTD, 4 ; Disable WR sbi PORTD, 6 ; Disable CS reti USBN_READ: ; Write ADDRESS: out PORTC, usbn_addr sbi PORTD, 7 ; Enable ALE cbi PORTD, 6 ; Enable CS cbi PORTD, 4 ; Enable WR nop nop nop sbi PORTD, 4 ; Disable WR ;sbi PORTD, 6 ; Disable CS cbi PORTD, 7 ; Disable ALE ; PORTC auf Eingang setzen: ldi r16, 0x00 out PORTC, r16 ldi r16, 0x00 out DDRC, r16 nop nop nop ldi usbn_rdbuff, 0b111111 ; Read Data Byte: cbi PORTD, 5 ; Enable RD ;cbi PORTD, 6 ; Enable CS nop nop nop in usbn_rdbuff, PORTC nop nop nop sbi PORTD,
in „USBN9604 + Atmega32“ · Mikrocontroller und Digitale Elektronik ·