-
Datei
K22LO_SHT71.txt
256 On Timer1 On_timer1 Enable Timer1 Enable Interrupts Timer1 = 51135 Do If Z = 3 Then Sck Alias Portc.5 Dataout Alias Portc.4 Datain Alias Pinc.4 Ddrc = &B11111111 Config Pinc.5 = Output Config Pinc.4 = Output Set Dataout For Ctr = 1 To 12 Set Sck Waitus 2 Reset Sck Waitus 2 Next Ctr Command = &B00000011
in „I2C Kombinations-Problem“ · 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 „Display nach Tutorial Probleme“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Test_ATmega8.c
TCCR1B |= (1<<WGM12 | 1<<WGM13); sei(); while(1) { //TODO:: Please write your application code //PORTC |= (1<<PC5); } } ISR(TIMER1_COMPA_vect){ //Timer Top, alle Servos auf High setzen PORTD |= (1<<PD7 | 1<<PD6 | 1<<PD5 | 1<< PD4 | 1<<PD3 | 1<<PD2 | 1<<PD1 | 1<<PD0); //Servos 0-7 auf High PORTC |= (
in „Debug-Problem in AVR-Studio 5“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
generator.c
OSC_RC32MEN_bm)) { } CCP = CCP_IOREG_gc;//0xD8; CLK.CTRL = CLK_SCLKSEL_RC32M_gc; } void init (void) { PORTC.DIR = PIN4_bm; // PortC Pin 4 -> OC1A Ausgang der PWM -> N PORTD.DIR = PIN0_bm | PIN1_bm; // PortD Pin 0 -> A Spur, Pin 1 -> B Spur PORTC.PIN4CTRL = PORT_INVEN_bm; // PortC Pin 4 invertieren EVSYS.CH0MUX
in „XMEGA DMA transfer nach PORT“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
noname1.bas
$regfile = "m8def.dat" $crystal = 8000000 'I²C konfigurieren Config Scl = Portc.5 Config Sda = Portc.4 Config I2cdelay = 3 Const Ds1307w = &HD0 Const Ds1307r = &HD1 'Variablen definieren Dim Nixiemulti As Byte Dim Sekunden As Byte Dim Minuten As Byte Dim Stunden As Byte Dim Minuteeiner
in „DS1307 - Atmega8 - Bascom - lässt sich nicht auslesen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
blink_led.asm
R27 ;blink_led.mpas,6 :: repeat L__main1: ;blink_led.mpas,7 :: PortC.0 := 1; 0x0062 0xB3B5 IN R27, PORTC+0 0x0064 0x60B1 SBR R27, 1 0x0066 0xBBB5 OUT PORTC+0, R27 ;blink_led.mpas,8 :: delay_ms(500); 0x0068 0xE12A LDI R18, 26 0x006A 0xE51E LDI R17, 94 0x006C 0xE60F LDI R16, 111 L__main6: 0x006E 0x950A
in „Vorteile von Basic, Pascal, C und C++ in einem: LunaAVR“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
DCF_Alarm.bas
10 Then Stell5 = 0 Call Alarm_berechnung Case 6 If Pinc.3 = 0 Then Incr Stellp If Stellp = 10 Then Portc.3 = 0 Portc.2 = 0 End If Call Alarm_berechnung Case 7 Locate 3 , 1 : Lcd "====ENDE========" Waitms 100 Call Alarm_berechnung Case 8 Locate 3 , 1 : Lcd "=====ENDE=======" Waitms 100 Call Alarm_berechnung
in „Billige timer0-Uhr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ultra2.asm
intcon,t0if ;Clear TMR0 int flag clrf tmr0 ;Timer0 clear ;*** Received Pulse detection check movfw portc ;Read PORTC register btfsc portc,ccp1 ;Detected ? goto detect_off ;Yes. Detected movlw h'0a' ;"Detect error" data movwf disp_u ;Set 1st digit movwf disp_t ;Set 10th digit movwf disp_h ;Set
in „PIC-Assembler - Probleme beim Assemblieren“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
MuxLtc.h
DDRC #define MUX_SEGCOUTREG PORTC #define MUX_SEGCINREG PINC #define MUX_SEGC 2 /*segmentd*/ #define MUX_SEGDDIRREG DDRC #define MUX_SEGDOUTREG PORTC #define MUX_SEGDINREG PINC #define MUX_SEGD 3 /*segmente*/ #define MUX_SEGEDIRREG DDRC #define MUX_SEGEOUTREG PORTC #define MUX_SEGEINREG PINC #define MUX_SEGE 4 /*segmentf*/ #define MUX_SEGFDIRREG DDRC #define MUX_SEGFOUTREG PORTC #define MUX_SEGFINREG PINC #define MUX_SEGF 5 /*segmentg*/ #define MUX_SEGGDIRREG
in „AVR Portpins“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
config.c
be no bug problem to do var_p = strstr_P(b,PSTR("%C1____")); // checkbox example if (var_p) { if (PORTC&(1<<PC1)) strncpy_P(var_p,PSTR("checked"),7); // copy w/o string end (NULL) else strncpy_P(var_p,PSTR(" "),7); // copy w/o string end (NULL) } var_p = strstr_P(b,PSTR("%A1_")); // number example if
in „AVR für wenig Geld im LAN“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Akku-Term_01.bas
Ausschalten Port D Const Ausmskb = &B11000000 'AND-Maske zum Rel. Ausschalten Port B T26taste Alias Portc.4 'Steuerpin Tiny26-Taste Bitmuster: 'Bitmuster der Relais Data 2 , 0 , 4 , 0 , 8 , 0 , 16 , 0 '4 Relais an PortD Positionen: 'LCD-Anzeigeposition je Akku Data &H11 , &H19 , &H21 , &H29 Prefixe: 'Anzeigetexte
in „Terminal schreiben nur bei "Input"“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
NEC_IR_senden_mit_M644_190412.bas
************************************************* 'eine Kontroll Led im sichtbaren Bereich Config Portc.3 = Output Kontroll_led Alias Portc.3 '************************ tasten und tasten INT ************************ '* An den Tastenports können 1nF Caps gegen GND hilfreich sein /Antiprell bei alten Tastern ' eine Taste an PC2 Config Portc.2 = Input Portc.2 = 1 ' Pullup ein Taste1 Alias Pinc.2 Config Portc.4 = Input Portc.4 = 1 ' Pullup ein Taste2 Alias Pinc.4 Dim Taste_gedrueckt As Byte Dim Taste_gedrueckt_alt As Byte 'int2 für Tastenabfrage
in „TIPP: NEC IR Codes mit Bascom senden“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
avrdiag.c
] == '0') PORTB &= ~mask; else PORTB |= mask; break; case 'C': DDRC |= mask; if (value[0] == '0') PORTC &= ~mask; else PORTC |= mask; break; case 'D': DDRD |= mask; if (value[0] == '0') PORTD &= ~mask; else PORTD |= mask; break; default: print_P(help); return; } } /* Setzt den angegebenen Pin oder Port
in „einfacher serieller Debugger für ATMega16“ · Projekte & Code ·
-
Datei
can-receiver.bas
bit identifier Dim Count As Byte 'LCD-Konfiguration Config Lcd = 20 * 4 Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.0 , Rs = Portc.1 Config Lcdbus = 4 Config Portb.4 = Output 'LCD initialisieren Initlcd Cls Cursor Off '--------------------------------
in „AVR AT90CAN128 bei CAN-Empfang langsam“ · 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); //Abfrag ob Taster gedrückt if(!(PINC & (1<<PC0))) { //Initialisierung von string für Ausgabe char z[]="Taster 1 gedrückt"; //Übergabe des
in „timer1 atmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Prop_Uhr.c
INTERRUPT(SIG_INTERRUPT0) { if(pos < 60 ) { // viel zu langsam OCR1A -= 100; // PORTB = 0x00; // PORTC = 0x00; } else if( pos > 60 ) { // viel zu schnell OCR1A += 100; // PORTB = 0x00; // PORTC = 0x00; } /* else { if( TCNT1 < (OCR1A/4) ) // Feinregelung OCR1A -= 10; // PORTB = 0x00; // PORTC = 0x00;
-
Datei
Thermometer_mit_3_RundanzeigenV2.1.bas
default use 10 for the SW stack $framesize = 40 'default use 40 for the frame space Config 1wire = Portc.3 ' DS18S20 on Port C.Pin3 Config Portd = Output 'Port D Ausgang für Motoren und LED Config Portc = Input 'PortC Eingang für Schalter, Lichtschranken, Tempsensor Config Portb.4 = Input Config Portb.0 = Output Config Portb.1 = Output Portc.0 = 1 'Pullups einschalten Portc.1 = 1 Portc.2 = 1 Portb.4 = 1 'Portb.4 auf low = Testbetrieb Rot Alias Portb.1 'Rot-Teil DuoLED Grün Alias Portb.0 'Grün-Teil DuoLED Kontakt1 Alias Pinc.0 'Kontakt
in „Atmega8 Thermometer mit Schrittmotoranzeige“ · Projekte & Code ·
-
Datei
drehzahl_4x.c
char n = 50; while(n--) _delay_ms(1); } void lcd_impuls(void) // Schreibimpuls mit Mindestlaenge { PORTC |= LCD_STROBE; _delay_us(2); PORTC &= ~LCD_STROBE; } void lcd_nibble(char c) // 4-bit-Wert ausgeben { char temp; temp = PORTB & 0xc3; // Datenleitungen an PortB.2 -> PortB.5 temp |= ((c>>2) & 0x3c)
in „4-Kanal Drehzahlmessung mit ATmega88“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
einfacheuhr.bas
1wire Schnittstelle festlegen, Schnittstelle wird von BASCOM durch Software realisiert Config 1wire = Portc.5 '##### Ausgang für tests ##### 'testausgang Tausgang Alias Portd.7 Config Tausgang = Output '##### BCD Displystellen von links nach rechts... ##### 'BCDStelle A Bcdstellea Alias Porta.2 Config Bcdstellea
in „DS1820 mit Multiplexen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rfm12b_avr.c
ifdef USE_soft_spi /* unsigned char i; cbi(PORTD, CS); for (i=0; i<16; i++) { if (wert&32768) sbi(PORTC, SDI); else cbi(PORTC, SDI); wert<<=1; if (PINC&(1<<SDO)) wert|=1; sbi(PORTD, SCK); asm("nop"); asm("nop"); cbi(PORTD, SCK); } sbi(PORTD, CS); return wert; */ unsigned short werti=0; unsigned char i; cbi(PORTD, CS); for (i=0; i<16; i++) { if (wert&32768) sbi(PORTC, SDI); else cbi(PORTC, SDI); werti<<=1; if (PINC&(1<<SDO)) werti|=1; sbi(PORTD, SCK); wert<<=1; asm("nop"); asm("nop"); cbi(PORTD, SCK); } sbi(PORTD, CS); return werti; #else CONVERTW val; val.w=wert
in „ST32F103 ---> AVR RFM12B“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 rjmp beim AVR Atmega 8L“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 „AVR8ASM TWI Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 „AVR8ASM TWI Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 „AVR8ASM TWI Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 „AVR8ASM TWI Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 „AVR8ASM TWI Interrupt“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 „AVR-Mikrocontrollertechnik-Kursus in Assembler besprechung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
m8def.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 „AVR-Mikrocontrollertechnik-Kursus in Assembler besprechung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
schule_schranke_servo_.asm
temp, HIGH(RAMEND) out SPH, temp ldi temp, 0xff out DDRC, temp ldi r19,255 ldi r20,0 warte1ms: out PORTC,r19 ; ============================= ; Warteschleifen-Generator ; 16000 Zyklen: ; ----------------------------- ; warte 15996 Zyklen: ldi R17, $1F WGLOP0: ldi R18, $AB WGLOP1: dec R18 brne WGLOP1 dec
in „Servo ansteuern in ASM mit AVR“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Clock_eigen2.bas
do not need longs $crystal = 3686400 $baud = 19200 'declare used subs 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
main.c
getSMDir ( PINC & (1 << PC1) ) #define getSMStart ( PINC & (1 << PC2) ) #define toggleSMEnable ( PORTC = PINC^(1 << PC0) ) #define toggleSMDir ( PORTC = PINC^(1 << PC1) ) #define toggleSMStart ( PORTC = PINC^(1 << PC2) ) enum { FALSE, TRUE }; //*******************************************************
in „Zeitkritisch ?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TouchGLCD.bas
3 - R/W - Rd ' 4 - E - Wr ' 5 - CS - Ce ' 6 - Res - Reset ' 7 - Beleuchtung_Power ' optimiert für PortC ! 'Config Portc = Output 'Portc = &B01110100 ' Touch werte ' LCD 1 ' X+ 800 Links, X- 175 Rechts -> 625 ' Y+ 715 Oben, Y- 290 Unten -> 425 ' LCD 2 ' X+ 790 Links, X- 190 Rechts -> 600 ' Y+ 715 Oben
in „Pollin 16080 Touch mit ATMEGA32 und BASCOM“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
rfid_v2.c
void) { // UARTDEBUG: // Flackern oder aus = UART RX empfängt // Dauerleuchten = UART RX wartet // PORTC |= (1<<PC0); while (!(UCSRA & (1<<RXC))) { } PORTC &= ~(1<<PC0); return UDR; } void long_delay(uint16_t mis) { for(; mis > 0; mis--) _delay_ms(1); } void card_ID_einlesen(void) { uint8_t anzahl_werte_in_card_ID
in „mega8 Dip UART != mega8 tqfp UART ?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd4bitsub.asm
for 4Bit I/F ;----------------------------------------- ; ; Connections ; DB4-DB7 PORTB 7..4 ; RS PORTC 2 ; RW PORTC 3 ; E PORTC 4 ;----------------------------------------- ;----------------------------------------- ; Basic configuration ;----------------------------------------- .equ autoMOVE = 1 ;
in „Tiny26 LCD an PortA und PortB“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Druck_Flow.c
eine Periode void fail_sound(void){ static uint8_t hilf; if (hilf >100) { /* Frequenz ca. 391Hz */ PORTC |= (1 << PC6); _delay_ms(1.28); PORTC &= ~(1 << PC6); _delay_ms(1.28); } else if (hilf >0) { /* Frequenz ca. 132Hz */ PORTC |= (1 << PC6); _delay_ms(3.8); PORTC &= ~(1 << PC6); _delay_ms(3.8); } else
in „Programmoptimierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Druck_Flow.c
eine Periode void fail_sound(void){ static uint8_t hilf; if (hilf >100) { /* Frequenz ca. 391Hz */ PORTC |= (1 << PC6); _delay_ms(1.28); PORTC &= ~(1 << PC6); _delay_ms(1.28); } else if (hilf >0) { /* Frequenz ca. 132Hz */ PORTC |= (1 << PC6); _delay_ms(3.8); PORTC &= ~(1 << PC6); _delay_ms(3.8); } else
in „Programmoptimierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Druck_Flow_veraendert.c
eine Periode void fail_sound(void){ static uint8_t hilf; if (hilf > 100) { /* Frequenz ca. 391Hz */ PORTC |= (1 << PC6); _delay_ms(1.28); PORTC &= ~(1 << PC6); _delay_ms(1.28); } else if (hilf > 0) { /* Frequenz ca. 132Hz */ PORTC |= (1 << PC6); _delay_ms(3.8); PORTC &= ~(1 << PC6); _delay_ms(3.8); } else
in „Programmoptimierung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
hardwaredef.h
1<<VERT_REF))) #define VERT_H_END PC6 // Output #define VERT_DIRECTION PC3 #define VERT_MOVE_DOWN PORTC |= (1<<VERT_DIRECTION) #define VERT_MOVE_UP PORTC &= ~(1<<VERT_DIRECTION) #define VERT_STOP PC2 #define VERT_BRAKE_OFF PORTC &= ~(1<<VERT_STOP) #define VERT_BRAKE_ON PORTC |= (1<<VERT_STOP) #define
in „ATMega32 Absturz bei Zeicheneingang“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
available from UART */ } else { switch (new_uartByte) { case 32: //Ein 1 Bit erhalten new_uartBit=1; PORTC |= (1 << PC7); break; case 0: //Ein 0 Bit erhalten new_uartBit=0; PORTC |= (0 << PC7); break; } if (bit_counter%2==0) { uartBit1=new_uartBit; PORTC |= (1 << PC6); } else { uartBit2=new_uartBit; PORTC
in „Probleme mit uart Einbindung & Linker“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
15; SERVO_13=15; SERVO_23=15; SERVO_33=15; SERVO_43=15; SERVO_53=15; } void LED_Ans() { if(k==0) { PORTC = 0b11000000; } if(k==2000) { PORTC = 0b00110000; } if(k==4000) { PORTC = 0b00001100; } if(k==6000) { PORTC = 0b00000011; } } void POS_Berechnung() { time0=SERVO_01; time1=SERVO_11; time2=SERVO_21;
in „Hardware PWM Timer1 funktioniert nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
char minute=0; //unsigned char second=0; DDRB = 0b10111111; PORTB |= (1<<PB6); DDRC = 0b11011111; PORTC |= (1<<PC5); PORTC|=(1<<PC3); //Betriebs-LED // 16 bit timer: TCCR1B = (1<<WGM12)|(1<<CS12)|(1<<CS10); // CTC + Prescaler 1024 --> CPU/1024 //TCCR1B = (1<<WGM12)|(1<<CS11)|(1<<CS10); // CTC + Prescaler
in „UART von Mega32 auf Mega168 anpassen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Motorsteuerung_6.c
verändert werden uint16_t eeMinwert EEMEM = 10; uint16_t eeMaxwert EEMEM = 1010; #define keypad_port PORTC #define port PINC //Signale für den Motortreiber #define Ausgabeport PORTA #define Rechtslauf 0b00000011 #define Linkslauf 0b00000101 // #define Motorstopp Ausgabeport &= ~(1<<PIN0) //3 Ausgänge werden
in „globaler EEPromwert wird unerwünscht geändert, wieso bitte?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
ViertelKurve.ino
Signalvergleich Sinus Positiv if(l<800) { if (D[n] < val*S[m]) { //Dreiecksignal kleiner als Sinussignal bitSet(PORTC, 6); //Pin 5 HIGH } else { //Dreiecksignal größer als Sinussignal bitClear(PORTC, 6); //Pin 5 LOW } if (D[n] < val*S[m]) { //Dreiecksignal kleiner als Sinussignal bitSet(PORTD, 7); //Pin 6 HIGH } else
in „Arduino Micro char array Wert negieren“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
/* PORTB0 = Motor PORTB1 = LED Blau (Sekunden) PORTB2 = LED Grün (Minuten) PORTC0 = LED Rot (Stunden) Für die Sekunden und Minuten kann der aktuelle Wert als Grad position für die Anzeige verwendet werden, da hier nur mit 60 grad pro umdreheung(59 wenn man den 0-Punkt mitzählt)
in „Atmega328P Interrupt löst dauerhaft aus“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
00643b.pdf
PIC16C72 025E 3001 MOVLW 01h Wait = 1; 025F 1283 BCF STATUS,RP0 0260 00AA MOVWF 2A 0261 1707 BSF PORTC,6 PORTC.RST = 1; // Reset the EPROM counter 0262 0000 NOP NOP(); 0263 0000 NOP NOP(); 0264 1307 BCF PORTC,6 PORTC.RST = 0; 0265 0000 NOP NOP(); 0266 0000 NOP NOP(); 0267 1085 BCF PORTA,1 PORTA.OE1
in „Messdaten Kompression“ · Digitale Signalverarbeitung / DSP / Machine Learning ·
-
Datei
adresse001.asm
dmx_adrL =R4 ;set start adress .def dmx_adrH =R5 ; .def status_temp =R7 .def status =R8 ;status bits for portc .def status1 =R9 ;status bits for portc .def currentL =R22 ;data .def currentH =R23 ;data .def dimm_count =R10 ;counter .def spi_flag =R18 .def spi_count =R28 .def timer_startH =R11 .def timer_startL
in „Migration AT90S4433 -> ATMega8“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
iom328p.h
#define DDC1 1 #define DDC2 2 #define DDC3 3 #define DDC4 4 #define DDC5 5 #define DDC6 6 #define PORTC _SFR_IO8(0x08) #define PORTC0 0 #define PORTC1 1 #define PORTC2 2 #define PORTC3 3 #define PORTC4 4 #define PORTC5 5 #define PORTC6 6 #define PIND _SFR_IO8(0x09) #define PIND0 0 #define PIND1 1 #define
in „ATMega16 mehrere Taster an INT0“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
9 and 10 to save one 74HC595 void shiftSegment(uint8_t segmentCode[8], uint8_t displayCode[10]) { PORTC |= (1<<SEG_MULTIPLEX_SEG9); PORTC |= (1<<SEG_MULTIPLEX_SEG10); PORTB &= ~(1<<SEG_STORE_PIN); for(int i = 2; i < 10; i++) { //First Display code PORTB &= ~(1<<SEG_SHIFT_PIN); if(displayCode[i] == 1)
in „7 Segment Multiplexing und USART Kommunikation(Baudraten)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Clock_eigen4.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
TouchGLCDm.bas
3 - R/W - Rd ' 4 - E - Wr ' 5 - CS - Ce ' 6 - Res - Reset ' 7 - Beleuchtung_Power ' optimiert für PortC ! 'Config Portc = Output 'Portc = &B01110100 ' Touch werte ' LCD 1 ' X+ 800 Links, X- 175 Rechts -> 625 ' Y+ 715 Oben, Y- 290 Unten -> 425 ' LCD 2 ' X+ 790 Links, X- 190 Rechts -> 600 ' Y+ 715 Oben
in „Pollin 16080 Touch mit ATMEGA32 und BASCOM“ · Mikrocontroller und Digitale Elektronik ·