-
Datei
main.c
wird */ void initClockTimer(void) { //PortC6,7 auf input ohne pullup schalten: PORTC &= ~((1<<7)|(1<<6)); DDRC &= ~((1<<7)|(1<<6)); //Timer2 Interrupts deaktivieren TIMSK &= ~((1<<OCIE2)|(1<<TOIE2)); //umschalten auf Assynchron --> Uhrenquarz ASSR = (1<<AS2); //rücksetzen alle betroffener
in „ATmega16: Timerinterrupt spinnt in Verbindung mit Sleep Modes“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
drehzbhkw8mtestneu.bas
konfigurieren: Config Lcd = 16 * 2 'LCD-Display mit 16 Zeichen in 2 Zeilen Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portb.2 , Rs = Portb.1 Enable Timer0 'Timer0-Interrupts ein (Torzeit) Enable Interrupts 'Interrupts global einschalten Start Timer0 '- - - -
in „Unterschiede Bascom Versionen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
stoppuhr.c
HEX-Codes für die sechs verschiedenen Adressen # der einzelnen Anzeigen. # # PORTB ist der Adressport, PORTC der Datenport. ##############################################*/ volatile unsigned char lauf; volatile unsigned char a; volatile unsigned char adresse[6]; volatile unsigned char anzwert[10]; volatile
-
Datei
main.c
void) { TCC0.CCD=TCC0.PER; while(TCC0.CNT!=0); TCC0.CTRLA = TC_CLKSEL_OFF_gc; } void setup(void) { PORTC.DIRSET = PIN3_bm; // Pin 3 (TXD0) as output. PORTC.DIRCLR = PIN2_bm; // Pin 2 (RXD0) as input. PORTD.DIRSET = PIN3_bm; PORTC.OUT |= (1 << PIN3); //PORTC_OUTTGL |= (1<<PIN3); TCC0.CTRLB = 0x00; // Waveform
in „Atxmega128a1-SRF01“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
GenProcs.c
/////////////////////// void Init(void){ unsigned int i; InitOSC(); InitPORTA(); InitPORTB(); InitPORTC(); InitPORTD(); InitPORTE(); LED_RT = 1; LED_GR = 1; InitTimer(); InitPWM1(); InitInterrupts(); InitADC(2); LCD_Init(ON); // Configure the device to access Data EEPROM memory EECON1bits.EEPGD = 0;
in „Array beschreiben schlägt fehl“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.vhd
'1' then PB <= PORTB; else PB <= (others => 'Z'); end if; end process; -- Treiber PORT C process (PORTC, DIRC) begin if DIRC = '1' then PC <= PORTC; else PC <= (others => 'Z'); end if; end process; -- Treiber PORT D process (PORTD, DIRD) begin if DIRD = '1' then PD <= PORTD; else PD <= (others => 'Z'
in „Erzeugung von Tri - State Signalen?“ · FPGA, VHDL & Co. ·
-
Datei
Segmentanzeige.c
EIN } if ((stelle==2) && (ziffern[2]==0)) // führende Stelle ist Null { segmente = ~s7_table[16]; } PORTC = 0xFF; // common Anode: alles AUS PORTD = segmente; // Segmente für nächste Stelle laden PORTC = ~(1<<stelle); // aktuelle Stelle aktivieren, invertiert wg. Common Anode, Spalte über PNP (0 -> EIN
in „Coundown Timer“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main_mit_c.c
void) { timer2_servo_init(); hc_sr04_init(); timer1_motorpwm_init(); sei(); while (1) { SERVO_MITTE; PORTC = (0<<MOTORB_2) | (0<<MOTORA_2) | (1<<MOTORB_EN) | (1<<MOTORA_EN); abstand = HC_SR_04(); if (abstand >100) { MOTOR_PWM(50,50); } else if (abstand > 40 && abstand <= 100) { MOTOR_PWM(35,35); } else
in „Externe .c bringt nur theater“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main_ohne_.C.c
void) { timer2_servo_init(); hc_sr04_init(); timer1_motorpwm_init(); sei(); while (1) { SERVO_MITTE; PORTC = (0<<MOTORB_2) | (0<<MOTORA_2) | (1<<MOTORB_EN) | (1<<MOTORA_EN); abstand = HC_SR_04(); if (abstand >100) { MOTOR_PWM(50,50); } else if (abstand > 40 && abstand <= 100) { MOTOR_PWM(35,35); } else
in „Externe .c bringt nur theater“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
spi_2_lcd.asm
sich die Spannung stabilisiert hat bcf PORTA,4 ;Löscht das Reset-Bit call WAIT_1ms ;Warte 1ms bcf PORTC,2 ;setzt A0 auf Low movlw 0x40 ;Display Start Line movwf SSPBUF call WAIT_100us movlw 0xA1 ;ADC reverse movwf SSPBUF call WAIT_100us movlw 0xC0 ;Normal Com0~Com63 movwf SSPBUF call WAIT_100us movlw
in „Ansteuerung des ST7565R via PIC-16F87A (Assembler)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
test.c
Ports //Register auf Eingang schalten (nur die ersten 4 bit),w DDRC = DDRC & 0xF0; //Initialisierung PORTC; PORTC = 0x0F; //Warten bis umgeschaltet ist _delay_ms(10); //Abfrage ob Taster gedrückt if(!(PINC & (1<<PC0))) { //Übergabe des strings uart_puts ("Taster 1 gedrückt"); //Zurücksetzen des Ports,damit
in „timer1 atmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Wattmeter_v1.53.c
~(1<<INT1); // Disable External Interrupt 1 PCICR &= ~(1<<PCIE2); // Disable Pin Change Interrupt PORTC &= ~((1<<PC0) | (1<<PC1)); // Turn Laser off } else State = Turn_on; break; case Turn_on: PORTC |= (1<<PC0) | (1<<PC1); // Turn Laser on State = Idle; break; case Synchronise: // No other Interrups
in „AM Demodulation“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Wattmeter_v1.6.c
~(1<<INT1); // Disable External Interrupt 1 PCICR &= ~(1<<PCIE2); // Disable Pin Change Interrupt PORTC &= ~((1<<PC0) | (1<<PC1)); // Turn Laser off } else State = Turn_on; sleep_mode(); // Only Minute Pulse will wake µC up break; case Turn_on: PORTC |= (1<<PC0) | (1<<PC1); // Turn Laser on State = Idle
in „AM Demodulation“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Wattmeter_v1.6.c
<= End_of_Night || Hour >= Start_of_Night) { EIMSK &= ~(1<<INT1); // Disable External Interrupt 1 PORTC &= ~((1<<PC0) | (1<<PC1)); // Turn Laser off } else State = Turn_on; sleep_mode(); // Only Minute Pulse will wake µC up break; case Turn_on: PORTC |= (1<<PC0) | (1<<PC1); // Turn Laser on State = Idle
in „AM Demodulation“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SchreibendeAtomuhrV1.02.bas
SchreibendeAtomUhrV1.01 $regfile = "m8def.dat" $crystal = 8000000 $hwstack = 128 $swstack = 40 $framesize = 60 Config Portc.5 = Output Ticktack Alias Portc.5 Config Portb.0 = Input Reset Portb.0 Config Portc = Output Config Portd = Output Config Portb.4 = Output '=0 wenn Uhrzeit auf DCF syncronisiert ist Syncled Alias Portb
in „Besser als qlocktwo? Natürlich!“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
CF-test.bas
' High 0xD9 ' Low 0xff ' ' Lockbit 0xff ' ' !Anmerkung JTAG muss abgeschaltet sein, belegt sonst PortC ' ' '----------------------------------------------------------------------------- ' ' Konzept: ECB-Karte mit 8255PIO für den Datenaustausch ' CF-Seite mit Atmega644p AVR-DOS für die Verwaltung der
in „Suche MOPPEL Projekt in Heft oder .PDF“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Empfangen.c
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT 1 als Eingang PORTD |= (1<<PD3); // Pull up aktivieren //EIMSK
in „RFM12b an Atmega168 - Empfangsprobleme“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Netzteil.c
============================ #define CLEAR_DISPLAY 0x01 #define CURSOR_HOME 0x02 #define LCD_PORT PORTC #define LCD_RS PA5 #define LCD_EN PA7 // ===================================== Funktionen ================================ void lcd_data(unsigned char temp1) // sendet Daten an das Display { PORTA
in „LCD zeigt nur was an, wenn STK500 eingeschaltet ist.“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Netzteil.c
============================ #define CLEAR_DISPLAY 0x01 #define CURSOR_HOME 0x02 #define LCD_PORT PORTC #define LCD_RS PA5 #define LCD_EN PA7 // ===================================== Funktionen ================================ void delay_ms(unsigned int chrms) // Verzögerung in "ms" { unsigned int zaehler
in „Und wieder das Display“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Netzteil.c
============================ #define CLEAR_DISPLAY 0x01 #define CURSOR_HOME 0x02 #define LCD_PORT PORTC #define LCD_RS PA5 #define LCD_EN PA7 // ===================================== Funktionen ================================ void delay_ms(unsigned int chrms) // Verzögerung in "ms" { unsigned int zaehler
in „Und wieder das Display“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Netzteil.c
============================ #define CLEAR_DISPLAY 0x01 #define CURSOR_HOME 0x02 #define LCD_PORT PORTC #define LCD_RS PA5 #define LCD_EN PA7 // ===================================== Funktionen ================================ void delay_ms(unsigned int chrms) // Verzögerung in "ms" { unsigned int zaehler
in „Und wieder das Display“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AD_Wandler.txt
Out Func6=Out Func7=Out // State0=0 State1=0 State2=0 State3=0 State4=0 State5=0 State6=0 State7=0 PORTC=0x00; DDRC=0xFF; // Port D initialization // Func0=In Func1=In Func2=In Func3=In Func4=In Func5=In Func6=In Func7=In // State0=T State1=T State2=T State3=T State4=T State5=T State6=T State7=T PORTD
in „AD Wandler Programm“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Touchkreiscode.s
ret sbic PINB,2 ret sbis PINB,4 ret ;jetzt ist die tasstensperre aktiviert ldi r18,0b00000111 out PORTC,r18 ldi r17,100 Aktiviert: wdr rcall Feuchtigkeit sbis PINB,0 rjmp Aktiviert sbic PINB,1 rjmp Aktiviert sbis PINB,2 rjmp Aktiviert sbic PINB,4 rjmp Aktiviert ldi r18,0b00000000 out PORTC,r18 ret ;-
in „Touchpadcode für http://www.mikrocontroller.net/articles/Touchpad“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Touchkreiscode.asm
ret sbic PINB,2 ret sbis PINB,4 ret ;jetzt ist die tasstensperre aktiviert ldi r18,0b00000111 out PORTC,r18 ldi r17,100 Aktiviert: wdr rcall Feuchtigkeit sbis PINB,0 rjmp Aktiviert sbic PINB,1 rjmp Aktiviert sbis PINB,2 rjmp Aktiviert sbic PINB,4 rjmp Aktiviert ldi r18,0b00000000 out PORTC,r18 ret ;-
in „Touchpadcode für http://www.mikrocontroller.net/articles/Touchpad“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
start.c
Takte PORTB &= ~(1<<SLOW_SCK); //2 Takte asm ("nop\n\t""nop\n\t"::); // 2 Takte //AD ausschalten PORTC &= ~(1<<SS1); //2 Takte //Nun ist das Ergebnis im Schieberegister //SPI-Takt auf SR1 legen //PORTC |= (1<<C1_SCK); //2 Takte SPSR &= ~(1<<SPIF); //2 Takte //SPI-Transfer starten (µC <- SR), @1Mhz (
in „AD-W. - Shiftregister - Atmega8 - SPI“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
protocol_float.c
0; } } void init(void) { recieved = 0; rec_ok = 0; bytecountRec = 0; bytecountSen = 0; // setting PortC as output for led-features and servo-motor control DDRC = 0xFF; PORTC = 0x00; //Initialization of UART UBRRH=(uint8_t)(UART_BAUD_CALC(UART_BAUD_RATE,F_CPU)>>8); UBRRL=(uint8_t)UART_BAUD_CALC(UART_BAUD_RATE
in „float via UART am ATMega16 empfangen (in C)“ · Projekte & Code ·
-
Datei
leddemo.c
key2Released(uint8_t duration) { if(duration >= KEY_PRESS_LONG) // bei lang gedrückter Taste set_bit(PORTC, 2); // LED 2 einschalten, else // bei kurz gedrückter Taste clear_bit(PORTC, 2); // LED 2 ausschalten } // in jedem Abtastzyklus auszuführende Aktion static void everyCycle(void) { if(KEY_DOWN(0)) // ist entprellte Taste 0 gedrückt set_bit(PORTC, 0); // LED 0 ausschalten else // sonst clear_bit(PORTC, 0); // LED 0 einschalten, } // processAllKeys verarbeitet alle Tasten und ruft die entsprechenden Aktionen auf static void processAllKeys(void
-
Datei
display.h
das was nicht mehr rein past (Bit 8-15) abgeschnitten writedata(LSB); } void writedata(int data){ PORTC.OUT = 0b00011111; //WR und CS High setzen PORTF.OUT = data; PORTC.OUT = 0b00010101; //Zum Transmitten WR (Bit 4)und CS (Bit 2)Low setzen } void writecommand(int command){ PORTC.OUT = 0b00011011; //WR und CS High setzen PORTF.OUT = command; PORTC.OUT = 0b00010001; //Zum Transmitten WR (Bit 4)und CS (Bit 2)Low setzen } void initLCD(){ writecommand(0xEF); writedata(0x03); writedata(0x80); writedata(0x02); writecommand(0xCF); writedata(0x00);
in „Atxmega Takteinstellung nicht mehr möglich“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Source.txt
Arbeitsregister vollständig aktivieren out DDRD, workreg ;PORTB auf Ausgang setzen out DDRC, workreg ;PORTC auf Ausgang setzen clr sekunde ;Sekunde auf 0 stellen clr minute ;Minute auf 0 stellen out PORTC, minute ;Mnute auf PORTB ausgeben clr stunde ;Stunde auf 0 stellen out PORTD, stunde ;Stunde auf PORTD
in „Uhreinstellung per Taster“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Source.txt
Arbeitsregister vollständig aktivieren out DDRD, workreg ;PORTB auf Ausgang setzen out DDRC, workreg ;PORTC auf Ausgang setzen clr sekunde ;Sekunde auf 0 stellen clr minute ;Minute auf 0 stellen out PORTC, minute ;Mnute auf PORTB ausgeben clr stunde ;Stunde auf 0 stellen out PORTD, stunde ;Stunde auf PORTD
in „Uhreinstellung per Taster“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
_Dokumentation_V1.7_Stand_27.02.2013.pdf
******************************************************************* Config Lcdpin = Pin , _ Db4 = Portc.3 , _ Db6 = Portc.1 , _ Db7 = Portc.0 , _ E = Portc.4 , _ Rs = Portc.6 Config Pinc.5 = Output Portc.5 = 0 Initlcd Cursor Off Cls Locate 1 , 1 Lcd " LED-Cube Status" Lcd "--------------------" Locate
in „Tutorial 10x10x10 LED-Cube“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
_Dokumentation_V1.8_Stand_27.03.2013.pdf
******************************************************************* Config Lcdpin = Pin , _ Db4 = Portc.3 , _ Db6 = Portc.1 , _ Db7 = Portc.0 , _ E = Portc.4 , _ Rs = Portc.6 Config Pinc.5 = Output Portc.5 = 0 Initlcd Cursor Off Cls Locate 1 , 1 Lcd " LED-Cube Status" Lcd "--------------------" Locate
in „Tutorial 10x10x10 LED-Cube“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
_Dokumentation_V1.9_Stand_23.09.2013.pdf
angesprochen: Config Lcdpin = Pin , _********************************************************* Db4 = Portc.3 , _ Db5 = Portc.2 , _ Db6 = Portc.1 , _ Db7 = Portc.0 , _ Rs = Portc.6, _ Config Lcd = 20 * 4 Config Pinc.5 = Output Portc.5 = 0 Cursor Off Cls Locate 1 , 1 Lcd " LED-Cube Status" Locate 2 , 1 Lcd
in „Tutorial 10x10x10 LED-Cube“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m32def.inc
Pins bit 5 .equ PINB6 = 6 ; Port B Input Pins bit 6 .equ PINB7 = 7 ; Port B Input Pins bit 7 ; ***** PORTC ************************ ; PORTC - Port C Data Register .equ PORTC0 = 0 ; Port C Data Register bit 0 .equ PC0 = 0 ; For compatibility .equ PORTC1 = 1 ; Port C Data Register bit 1 .equ PC1 = 1 ; For compatibility .equ PORTC2 = 2 ; Port C Data Register bit 2 .equ PC2 = 2 ; For compatibility .equ PORTC3 = 3 ; Port C Data Register bit 3 .equ PC3 = 3 ; For compatibility .equ PORTC4 = 4 ; Port C Data Register bit 4 .equ PC4
in „Probleme mit KontrollerLab und Assembler“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ATmega88A_bf.h
bf:1; } __attribute__((__packed__)); #define PIND_BF (*(volatile struct PIND_bits *)&PIND) struct PORTC_bits { uint8_t PORTC0_bf:1; uint8_t PORTC1_bf:1; uint8_t PORTC2_bf:1; uint8_t PORTC3_bf:1; uint8_t PORTC4_bf:1; uint8_t PORTC5_bf:1; uint8_t PORTC6_bf:1; uint8_t DUMMY7_bf:1; } __attribute__((__packed__)); #define PORTC_BF (*(volatile struct PORTC_bits *)&PORTC) struct DDRC_bits { uint8_t DDC0_bf:1; uint8_t DDC1_bf:1; uint8_t DDC2_bf:1; uint8_t DDC3_bf:1; uint8_t DDC4_bf:1; uint8_t DDC5_bf:1; uint8_t DDC6_bf:1; uint8
in „PWM-Pin von AVR deaktivieren“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Adc.asm
temp auf Stack fuer 2. Halbbyte swap temp ; Bit 4-7 nach unten tauschen andi temp,0b00001111 out PORTC,temp ; Bit 4-7 mit RS=0 (=Befehl senden) ausgeben rcall lcd_E pop temp ; hole altes Datenbyte wieder her andi temp,0b00001111 out PORTC,temp ; Bit 0-3 mit RS=0 (=Befehl senden) ausgeben rcall lcd_E rcall delay50us ret ;--- LCD-Treiber: Enable-Puls ------- ; Input: - ; veraendert: - lcd_E: sbi PORTC,5 ; 6. bit=E high nop ; 6 Taktzyklen warten (bei 8MHz) nop nop nop nop nop cbi PORTC,5 ; E wieder low ret ;--- LCD-Treiber: 50us Pause nach jeder Uebertragung ------- ; Input: - ; veraendert: SREG
in „AD-Wandler spinnt . . .“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
z80.asm
dram_setaddr nop nop cbi portb,ram_ras ldi zh,0 mov zl,adrl ori zl,0x80 rcall dram_setaddr nop nop cbi portc,ram_cas nop nop cbi portc,ram_w nop nop nop sbi portc,ram_w sbi portc,ram_cas ldi zh,0 mov zl,adrl andi zl,0x7F rcall dram_setaddr swap temp rcall dram_sendnibble cbi portc,ram_cas nop nop cbi portc,ram_w nop nop sbi portc,ram_w nop nop sbi portc,ram_cas sbi portb,ram_ras in temp,ddrc andi temp,0xE2 out ddrc,temp in temp,portc andi temp,0xE2 out portc,temp sei ret refrint: nop nop nop cbi portc,ram_cas nop nop nop nop
in „CP/M auf ATmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
avr-m8_z80.asm
dram_setaddr nop nop cbi PORTB,ram_ras ldi zh,0 mov zl,adrl ori zl,0x80 rcall dram_setaddr nop nop cbi PORTC,ram_cas nop nop cbi PORTC,ram_w nop nop nop sbi PORTC,ram_w sbi PORTC,ram_cas ldi zh,0 mov zl,adrl andi zl,0x7F rcall dram_setaddr swap temp rcall dram_sendnibble cbi PORTC,ram_cas nop nop cbi PORTC,ram_w nop nop sbi PORTC,ram_w nop nop sbi PORTC,ram_cas sbi PORTB,ram_ras in temp,ddrc andi temp,0xE2 out ddrc,temp in temp,PORTC andi temp,0xE2 out PORTC,temp sei ret refrint: nop ; nop ; nop cbi PORTC,ram_cas ; nop ; nop
in „CP/M auf ATmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
channels.c
PWM_PORTB &= ~(1<<PB4); PWM_PORTB &= ~(1<<PB5); PWM_PORTB &= ~(1<<PB6); PWM_PORTB &= ~(1<<PB7); PWM_PORTC &= ~(1<<PC0); PWM_PORTC &= ~(1<<PC1); PWM_PORTC &= ~(1<<PC2); PWM_PORTC &= ~(1<<PC3); PWM_PORTC &= ~(1<<PC4); PWM_PORTC &= ~(1<<PC5); PWM_PORTC &= ~(1<<PC6); PWM_PORTC &= ~(1<<PC7); PWM_PORTE &= ~(
in „Wie macht man solche Lichtmodes? Lauflicht, PWM und Co“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
PWM.c
tempPointer; if (++loopCounter==511) { // nur einmal / Zyklus neu ?bernehmen loopCounter=0; PORTA = 0xFF; PORTC = ((PORTC&0x01) | 0b01111110); //Keep debug LED on, if it already is. if (takeNewValuesOK==1) { takeNewValuesOK = 0; tempPointer = currentPointerForISR; currentPointerForISR = currentPointerForMAIN
in „12bit, 9-Kanal Soft-PWM für LEDs auf Mega16“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
LPH8731-3C.c
_ ); \ if( (_val_ & (1<<_bit_)) ) BitSet( _portd_, _pind_ ); \ BitSet( _portc_, _pinc_);\ BitClr( _portc_, _pinc_); #else #ifdef _SOFT_SPI_SLOWER1 #define SLOWDOWN1 asm volatile ( "nop;"); /* if the LCD does not initialize, try slowing down (this as second try) */ #else #define
in „LCD LPH8731-3C aus Siemens-Handys, Treiber“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
source.bas
sendx : low portd.1 ' portb = C10 : high portd.0 : gosub sendx : low portd.0 ' portb = C9 : high portc.7 : gosub sendx : low portc.7 ' portb = C8 : high portc.6 : gosub sendx : low portc.6 ' portb = C7 : high portc.5 : gosub sendx : low portc.5 ' portb = C6 : high portc.4 : gosub sendx : low portc.4 ' drawchar: portb = C5 : high portc.3 : gosub sendx : low portc.3 'draw character portb = C4 : high portc.2 : gosub sendx : low portc.2 ' portb = C3 : high portc.1 : gosub sendx : low portc.1 ' portb = C2 : high portc.0 : gosub sendx
in „.bas übersetzten in Picbasic Pro?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Clock_eigen3.bas
'generell alle Interrupts aktivieren Config Portb = Output Portb = 63 Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portb.0 , Db7 = Portd.7 , E = Portd.5 , Rs = Portd.4 Config Lcd = 40 * 2 Declare Sub Settime(byval S1 As Byte , Byval M1 As Byte , Byval H1 As Byte , Byval D1 As Byte , Byval
in „Ansteuerung eines PCF8583“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
netzteil-4x20.bas
---------------------------------------------- Config Portd = Output Config Portb = Output Config Portc = &B11100000 Config Timer2 = Pwm , Async = Off , Prescale = 1 , Pwm = On , Compare Pwm = Clear Up , Clear Timer = 0 Config Adc = Single , Prescaler = Auto , Reference = Avcc Config Spi = Hard , Interrupt
in „Problem mit Bascom und SPI“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
glcd.c
void); uint8_t lcd_status_read(void); int main(void){ DDRA=0xff; DDRE=0xff; DDRC=0x7f; DDRD=0xff; PORTC=0; step(); PORTD=lcd_status_read(); ++PORTC; step(); lcd_init(); PORTD=lcd_status_read(); ++PORTC; step(); lcd_on_off(0); PORTD=lcd_status_read(); ++PORTC; step(); lcd_on_off(1); PORTD=lcd_status_read
in „ATMega128 mit KS0108 LCD: Schreiben setzt Display auf OFF“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Timer1Test_1.bas
schrittnummer , Schritttab) H2 = H1 And 8 'bit 4 filtern Shift H2 , Right , 3 'um 3 nach rechts verschieben Portc.6 = H2 'ausgeben H2 = H1 And 4 Shift H2 , Right , 2 Portc.7 = H2 H2 = H1 And 2 Shift H2 , Right , 1 Portb.0 = H2 H2 = H1 And 1 Portb.1 = H2 'Print Portc.6 ; Portc.7 ; Portb.0 ; Portb.1 Else Tccr0 =
in „ATMega32: Schrittmotor periodisch bewegen?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TID.c
void){ init_DDR(); init_timer(); SDA_high(); SCL_high(); MRQ_high(); sei(); } void send_start(void){ PORTC=1; MRQ_low(); while(get_SDA()); //warte bis SDA low delay_50us(2); MRQ_high(); PORTC=2; while(!get_SDA()); //warte bis SDA high delay_50us(2); SDA_low(); delay_50us(3); SCL_low(); delay_50us(3); PORTC
in „Hat schonmal einer ein Opel TID ->erfolgreich<-angesteuert ?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd.h
Daten müssen zusammenliegen, können aber an einer // beliebigen Postion anfangen // LCD DB4-DB7 <--> PORTC Bit PC2-PC5 #define LCD_PORT PORTC #define LCD_DDR DDRC // LCD Datenbus, Bitnummer des untersten Bits D4, kann auf den // Portbits 0..4 liegen #define LCD_DB PC2 // LCD RS <--> PORTC Bit PC0 (RS: 0=Data, 1=Command) #define LCD_RS PC0 // LCD EN <--> PORTC Bit PC1 (EN: 1-Impuls für Daten) #define LCD_EN PC1 //////////////////////////////////////////////////////////////////////////////// // LCD Ausführungszeiten (MS=Millisekunden, US=Mikrosekunden) #define
in „Umstieg von Atmega8 auf Atmega168 LCD initialisiert nicht mehr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd.h
Daten müssen zusammenliegen, können aber an einer // beliebigen Postion anfangen // LCD DB4-DB7 <--> PORTC Bit PC2-PC5 #define LCD_PORT PORTC #define LCD_DDR DDRC // LCD Datenbus, Bitnummer des untersten Bits D4, kann auf den // Portbits 0..4 liegen #define LCD_DB PC2 // LCD RS <--> PORTC Bit PC0 (RS: 0
in „ADC-Wert nicht linear beim Einlesen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Sowftware_ACK_Test.asm
equ test = 7 .def Daten = r17 ;Adresse vom LM75 = 1001001x ( 0=write / 1=read ) .macro SDA_HI sbi portc, sda .endmacro .macro SDA_LO cbi portc, sda .endmacro .macro SCL_HI sbi portc, scl .endmacro .macro SCL_LO cbi portc, scl .endmacro RESET: ;STACK initialisieren ldi r16, LOW(RAMEND) out SPL, r16 ldi
in „Blutrausch wegen i2c“ · Mikrocontroller und Digitale Elektronik ·