Suchergebnisse für "portc"
Thread
--> Ausgang PORTA |= 0x00; //All Outputs PORTB |= 0x00; //All outputs/undefined PORTC |= 0xff; //SW 0..5 with Pull-Up PORTD |= 0x40; //SW 6 with Pull-Up SW_Init(); //Initialize Taster sei(); //Global IRQ-Enable //SW_Init(); //Initialize Taster }
--> Ausgang PORTA |= 0x00; //All Outputs PORTB |= 0x00; //All outputs/undefined PORTC |= 0xff; //SW 0..5 with Pull-Up // c-->f PORTD |= 0x40; //SW 6 with Pull-Up SW_Init(); //Initialize Taster sei(); //Global IRQ-Enable } void SW_Init() { PCICR = 0x0c
Mikrocontroller und Digitale Elektronik
· Matthias
· 20.12.2020 21:24
· 14 Antworten
Thread
} R1_temp = R1_temp >> 1; if (G1_temp & 0x1){ PORTC |=(1<<G1);} else{ PORTC &= ~ (1<<G1); } G1_temp = G1_temp >> 1; if (B1_temp & 0x1){ PORTC |= (1<<B1);}
//Clock Signal erzeugen PORTC |= (1<<CLK); _delay_us(0.1); PORTC &= ~(1<<CLK); } //Ein"latchen" der Reihe PORTC |= (1<<PC5); _delay_us(0.1); PORTC &= ~(1<<PC5)
Mikrocontroller und Digitale Elektronik
· Johannes M.
· 19.12.2020 20:49
· 43 Antworten
0b10000011, 0b10010011}; uint8_t timer_counter = 0; uint8_t number = 0; ISR(TIMER0_COMPA_vect) { PORTC = PC_Bitmaske[number]; // 7 Segmentanzeige des Zählwerts (Ziffer) PORTD = PD_Bitmaske[number]; timer_counter++; // Softwareteiler für langsameres Zählen if (timer_counter == 100) { timer_counter =
in
„interrupt nutzen“
·
Mikrocontroller und Digitale Elektronik
·
16.12.2020 15:07
Thread
initialisieren (Alle LEDs aus, restliche Bits passend für Input und Tristate) DDRC = 0x18; PORTC = 0xFF; DDRD = 0x7C; PORTD = 0x7C; // Timer/Counter 0 initialisieren: CTC Modus, Prescaler 1/1024, Interrupt-Intervall 10 ms TCCR0A = (1<<WGM01); TCCR0B = (1<<CS02)|(1<<CS00
passend für Input und Tristate) DDRC = 0x18; PORTC = 0xFF; DDRD = 0x7C; PORTD = 0x7C; // Timer/Counter 0 initialisieren: CTC Modus, Prescaler 1/1024, Interrupt-Intervall 10 ms TCCR0A = (1<<WGM01); TCCR0B = (1<<CS02)
Mikrocontroller und Digitale Elektronik
· Jürgen V.
· 16.12.2020 17:36
· 12 Antworten
inp. .equ PrtB0 = 0 ; PortB Bit0 = input QA(=T0 count inp.) ; Port C connections: .equ PrtC7 = 7 ; PortC Bit7 = not used .equ DP = 6 ; PortC Bit6 = output store decimal point active low .equ ONE = 5 ; PortC Bit5 = output leading "one" digit .equ KILO = 4 ; PortC Bit4 = output "k"Hz digit .equ DB3 = 3 ; PortC Bit3 = output LCD-databus Bit 3 .equ DB2 = 2 ; PortC Bit2 = output LCD-databus Bit 2 .equ DB1 = 1 ; PortC Bit1 = output LCD-databus Bit 1 .equ DB0 = 0 ; PortC Bit0 = output LCD-databus Bit 0 ; Port
in
„FPGA reziproker Frequenzzähler“
·
FPGA, VHDL & Co.
·
07.12.2020 21:24
PIC18F46K22 mit externen 4MHz Quarz auf MikroElektronika EasyPIC v7 Belegung: PORTA = PORTB = LCDisplay PORTC = RC4_bit SDI1 --> RC5_bit SDO1 --> SDA RC3_bit SCK1 --> CLock SPI/I2C PORTD = Belegung SDO = Vcc CS = GND I2C --> I2C1-Modul -----------------------------------------------------------------------
in
„BME680 Druckberechnung viel zu hoch“
·
Mikrocontroller und Digitale Elektronik
·
01.12.2020 20:06
Spalten - Input, ' PC4 und PC5 - Benutzt fuer das Interface zum externen EPROM Ddrc = &B00110000 Portc = &B11111111 '' Ddrb.6 = 1 ' PortB.6 Tastaturzeile, Output '' Ddrb.7 = 1 ' PortB.7 Tastaturzeile, Output '' Portb.6 = 1 ' Pullup '' Portb.7 = 1 ' Pullup '' Ddrb.0 = 1 ' PortB.0 steuert die Display-Beleuchtung
in
„Noch ein Taschenrechner auf ATMega Basis“
·
Projekte & Code
·
01.12.2020 08:35
Thread
Volt liefern wenn man sie auf Ausgang schaltet ? bei mir ist das jedenfalls so. alle 4 anderen von PORTC sowie alle 8 von PORTB und alle 8 von PORTD liefern 3,9 Volt. (bitte keine Titulierungen als Troll mehr. Ich stelle nur ernstgemeinte Fragen)
Mikrocontroller und Digitale Elektronik
· Michael S.
· 27.11.2020 23:44
· 9 Antworten
Default Pin: TCA1 CMP0 = PB0 PORTMUX auf Port C: TCA1 CMP0 = PC4 */ PORTMUX.TCAROUTEA = PORTMUX_TCA1_PORTC _gc; // TCA1 WO0 Portmux Port.C VPORTC.DIR = VPORTC.DIR | _BV(4); // PC4 - TCA1 WO0 } void initEventSystem (void) { EVSYS.CHANNEL0 = EVSYS_CHANNEL0_PORTA_PIN4_gc; // set Pin PA4 as input event EVSYS.USERTCB0CAPT
in
„AVR128DB48 - TCB 32Bit Counter“
·
Mikrocontroller und Digitale Elektronik
·
27.11.2020 10:51
Thread
1 << DDD0); // Pin 0 von Port D als Ausgang PORTD |= (1 << PD0); // PD0 im PORTD setzen PORTC |= (1 << DDC0); // internen Pull-Up an PC7 aktivieren for(;;) { // main loop if ( PINC & (1<<PINC0) ) PORTD = PIND ^ ( 1 << PD0 ); // LED
LEDs sind auf dem STK500 mit dem PORTD über das Flachbandkabel verbunden. Genauso die Taster mit PORTC . Beides funktioniert auch einwandfrei, z.B. mit dem Entprellprogramm von Peter D. Solange ich den Taster gedrückt halte geht die LED aus. Wenn ich im falschen Moment drücke, bleibt sie an, aber
Mikrocontroller und Digitale Elektronik
· Thomas
· 26.11.2020 17:29
· 88 Antworten
Thread
einmal als analog Pin konfiguriert. Das umschalten auf digital Port dauert demnach etwas. Bei PortC ist noch ein Modul zugeschaltet, welches man abschalten sollte.
Mikrocontroller und Digitale Elektronik
· danny_78
· 04.12.2020 20:01
· 6 Antworten
define PWMCDDR DDRC #define PWMBDDR DDRB #define PWMEDDR DDRE #define PWMAPORT PORTA #define PWMCPORT PORTC #define PWMBPORT PORTB #define PWMEPORT PORTE #define PWM1PIN PA0 #define PWM2PIN PA1 #define PWM3PIN PA2 #define PWM4PIN PA3 #define PWM5PIN PA4 #define PWM6PIN PA5 #define PWM7PIN PA6 #define PWM8PIN
in
„EEPROM Adresse über 255 und SOFT PWM Frage/Anliegen“
·
Mikrocontroller und Digitale Elektronik
·
07.11.2020 13:35
Thread
#define BAUD 19200 //Debug #define MYUBRR FOSC/16/BAUD-1 #define LED_PORT PC0 #define LED_ON PORTC |= (1 << LED_PORT) #define LED_OFF PORTC &= ~(1 << LED_PORT) #define RC_RECEIVER_PORT PD2 #define RISING_EDGE PIND & (1 << RC_RECEIVER_PORT) /*Variablen*/ volatile uint16_t Throttle; volatile
Mikrocontroller und Digitale Elektronik
· l. w.
· 19.09.2021 20:46
· 47 Antworten
XON 17 //Controller frei //Define Software SPI || Controller SPI gegenstelle #define spi_reset_HI PORTC |= (1<<PC0) #define spi_reset_LOW PORTC &=~(1<<PC0) #define spi_sck_HI PORTB |= (1<<PB7) #define spi_sck_LOW PORTB &=~(1<<PB7) //#define spi_sdo_i PB6 //#define spi_sdo_p PINB //#define spi_sdo !(spi_sdo_p
in
„ATmega32 ueber Software SPI programmieren scheitert“
·
Mikrocontroller und Digitale Elektronik
·
31.10.2020 16:48
Ports void Ausgabe(uint8_t zahl) { uint8_t s1, s2; s1 = zahl / 10; s2 = zahl % 10; PORTA = Zahl[s1]; PORTC = Zahl[s2]; } int main(void) { int8_t zaehler; // init IOs DDRA = 0xff; DDRC = 0xff; DDRD = 0b11111011; // disable analog comparator ACSR = 0x80; // init INT0 for low level GICR |= (1 << INT0); MCUCR
in
„Atmega32 INT0 setzt Timer1 außer Kraft“
·
Mikrocontroller und Digitale Elektronik
·
23.10.2020 22:53
aus) { zaehlen=ja; } } void Zeit() { zaehlen=nein; ausgabe=nein; if(zaehler==30) { PORTA = Zahl[3]; PORTC = Zahl[0]; } else if(zaehler>19) { PORTA = Zahl[2]; PORTC = Zahl[zaehler-20]; } else if(zaehler >9) { PORTA = Zahl[1]; PORTC = Zahl[zaehler-10]; } else if(zaehler>0) { PORTA = Zahl[0]; PORTC = Zahl[zaehler]; } else { PORTA = Zahl[0]; PORTC = Zahl[0]; } } int main(void) { DDRA = 0xff; DDRC = 0xff; DDRD = 0b11111011; GICR |= (1 << INT0); ACSR = 0x80; MCUCR = 0b00000000; displayoff; zaehlen=nein; OCR1A=120; //OCR1A=30; TIMSK = (1<<OCIE1A
in
„Atmega32 INT0 setzt Timer1 außer Kraft“
·
Mikrocontroller und Digitale Elektronik
·
23.10.2020 12:32
tempreadinterval == 0) { TSDS18x20 DS18x20; TSDS18x20 *pDS18x20 = &DS18x20; if (DS18x20_Init(pDS18x20,&PORTC ,PC4)) { // Sensor not found temp1 = 0; } else { tdata = 1; // Sensor Found // Set DS18B20 resolution to 12 bits. DS18x20_SetResolution(pDS18x20,CONF_RES_12b); DS18x20_WriteScratchpad(pDS18x20); //
in
„Timerberechnung die hunderste“
·
Mikrocontroller und Digitale Elektronik
·
21.10.2020 16:25
#define ADC1DDR DDRG #define ADC2DDR DDRC #define ADC1PORT PORTG #define ADC2PORT PORTC #define ADC1PIN PG0 #define ADC2PIN PC7 #define PIR1DDR DDRC #define PIR2DDR DDRA #define PIR1PORT PORTC #define PIR2PORT PORTA #define PIR1DDRPIN PINC0 #define PIR2DDRPIN PINA7 #define PIR1PIN PC0 #define PIR2PIN PA7 #define TEMP1DDR DDRC #define TEMP2DDR DDRA #define TEMP1PORT PORTC #define TEMP2PORT PORTA #define TEMP1PIN PC4 #define TEMP2PIN PA3
in
„Timerberechnung die hunderste“
·
Mikrocontroller und Digitale Elektronik
·
21.10.2020 16:25
Thread
ich damit meine ist Folgendes: So sieht es ja normalerweise aus, wenn ich einen Pin high setze: PORTC |= _BV(PC4); Nun würde ich gerne das bit durch eine Variable ersetzen: if (irgendwas) gate =PC4; if (was anderes) gate =PC5; PORTC |= _BV(gate); ... Wie mache ich das am einfachsten?
PC4; if (was anderes) gate =PC5; [/c] Und wenn weder "irgendwas" noch "was anderes"? [c] PORTC |= _BV(gate); [/c] Ja passt doch, wenn du /vorher/ natürlich erst mal beide möglichen Bits PC4 und PC5 zurückgesetzt hast. Woran klemmts?
Mikrocontroller und Digitale Elektronik
· Nicola R.
· 15.10.2020 22:29
· 9 Antworten
t addr) { uint8_t addrh; uint8_t addrl; addrl = addr & 0xFF; addrh = (addr >> 8) ; PORTA = addrl; PORTC = addrh; } static inline uint8_t Z80_setAddress(uint16_t adr) { setAddressbusActive(); Z80_writeAddrBus(adr); setAddressbusInactive(); } static inline void set_nWAIT(boolean bitValue) { if(bitValue
in
„ZX81 plus38 Clone“
·
Projekte & Code
·
09.10.2020 20:41
Thread
für die SD-Card vorgesehen. Die DB Serie wäre sicher eine gute Lösung, dann könnte ich den SPI vom PORTC verwenden. Im Moment habe ich einfach keinen zur Hand. SPI funktioniert bei mir nur wenn ich SPI0_INTFLAGS auslese und danach SPI0_DATA, das SPI_IF Flag schaue ich aber gar nicht an. Ich muss das
Mikrocontroller und Digitale Elektronik
· S. Landolt
· 28.11.2020 15:34
· 32 Antworten
Thread
setnum(uint8_t num) { uint8_t oldSREG = SREG; cli(); PORTB |= (seg_codeB[num] & BMask); PORTC |= (seg_codeC[num] & CMask); PORTD |= (seg_codeD[num] & DMask); SREG = oldSREG; } [/c]
Mikrocontroller und Digitale Elektronik
· Philipp K.
· 11.12.2020 00:53
· 24 Antworten
t addr) { uint8_t addrh; uint8_t addrl; addrl = addr & 0xFF; addrh = (addr >> 8) ; PORTA = addrl; PORTC = addrh; } static inline void setAddressbusActive() { DDRA = 0xFF; // set address bus as OUTPUT DDRC = 0xFF; // set address bus as OUTPUT } static inline void setDatabusActive() { DDRL = 0xFF; // set
in
„ZX81 plus38 Clone“
·
Projekte & Code
·
26.09.2020 13:52
Thread
char data) { // wait for transmit buffer to be empty if (UCSR0A & (1 << UDRE0)) { PORTC |= (1 << PC0); } else { PORTC &=~(1 << PC0); } while(!(UCSR0A & (1 >> UDRE0))); // load data into transmit register UDR0 = data; } [/c]
Mikrocontroller und Digitale Elektronik
· Lukas B.
· 23.09.2020 20:47
· 12 Antworten
uint16_t addr) { uint8_t addrh; uint8_t addrl; addrl = addr & 0xFF; addrh = addr << 8 ; PORTA = addrl; PORTC = addrh; } static inline uint8_t Z80_in(uint8_t address) { uint8_t value; // for this function we expect that the data bus is set to input before // DDRL = 0; // set data bus as INPUT ( inactive )
in
„ZX81 plus38 Clone“
·
Projekte & Code
·
20.09.2020 07:45
(1<<Down); // Key "->" DDRD |= (1<<PIN6); // FAN PWM out PORTB |= (1<<ADC_ADW); // Pullup enabled PORTC |= (1<<UI); // Pullup UI switch PORTD |= (1<<PIN0); // Pullup Regler PORTD |= (1<<PIN1); // Pullup Key "Regler" PORTC |= (1<<PIN3); // Pullup Key Standby PORTC |= (1<<PIN5); // Pullup Key "Memory" PORTC |= (1<<PIN4); // Pullup Key "Enter" PORTD |= (1<<Enc_A); // Pullup Encoder Pin A PORTD |= (1<<Enc_B); // Pullup Encoder Pin B PORTC |= (1<<Up); // Pullup Key "<--" PORTC |= (1<<Down); // Pullup Key
in
„PPS5330 Labor-Netzteil hack“
·
Mikrocontroller und Digitale Elektronik
·
11.09.2020 21:19
Thread
als Ausgänge PORTB = 0xFF; DDRC = 0xFF; //PortC als Ausgänge PORTC = 0xFF; DDRD = 0x00; //PORTD als Eingänge } int main(void) { _setup(); while (1) { if(jflags &= (1<<taster_einlesen)) { _taster_einlesen
Mikrocontroller und Digitale Elektronik
· Andre
· 11.09.2020 11:26
· 1 Antworten
(1<<Down); // Key "->" DDRD |= (1<<PIN6); // FAN PWM out PORTB |= (1<<ADC_ADW); // Pullup enabled PORTC |= (1<<UI); // Pullup UI switch PORTD |= (1<<PIN0); // Pullup Regler PORTC |= (1<<PIN3); // Pullup Key Standby PORTD |= (1<<Enc_A); // Pullup Encoder Pin A PORTD |= (1<<Enc_B); // Pullup Encoder Pin B PORTC |= (1<<Up); // Pullup Key "<--" PORTC |= (1<<Down); // Pullup Key "-->" } //************************************************************************* // print UI values on screen //****************
in
„PPS5330 Labor-Netzteil hack“
·
Mikrocontroller und Digitale Elektronik
·
03.09.2020 18:21
2100K 1 PP4V5_AUDIO_ANALOG 51 54 55 55 54 514V5_AUDIO_ANALOG AUD_TYPEDET_OD_INV SPEAKERID NC AUD_PORTC _DET_L 1/20W 1C6810 MF 6 0.1UF 201 C6800 1 PLACE_NEAR=Q6800.4:5.1MM 6.3V 0.1UF 2 X5R - 6.3V 201 SPEAKERID Q6800 H X5R 2 Q6896 D 6 DMC2400UV N G AUD_TYPEDET_OD 201 SSM6N15AFE SOT563 S IN 55 SPEAKERID
in
„Macbook Schaltpläne“
·
Mikrocontroller und Digitale Elektronik
·
03.09.2020 15:54
simultaneously as both master and slave on different pins. 2. ADC inputs are available on MVIO pins (PORTC ) if the MVIO is disabled in the MVSYSEN fuse setting. 3. PF6/RESET pin is input only. © 2020 Microchip Technology Inc. Product Brief DS40002215A-page 5 AVR DD Family Table of Contents Introduction.
in
„AVR-DD im Anrollen“
·
Mikrocontroller und Digitale Elektronik
·
02.09.2020 13:20
Thread
fired at the expected dim level DL { clock_tick++; if (dim_level == clock_tick) { PORTC |= 0b01000000; //Triac high- delayMicroseconds(10); PORTC &= ~0b01000000; //Triac low } } void zero_cross_int() // reset if sinus wave travels through zero point { clock_tick
Mikrocontroller und Digitale Elektronik
· Tim Z.
· 30.08.2020 21:36
· 4 Antworten
(1<<Up); // Taste "<-" DDRB &= ~(1<<Down); // Taste "->" PORTD |= (1<<ADC_ADW); // Pullup enabled PORTC |= (1<<UI); // Pullup UI switch PORTC |= (1<<PIN3); // Pullup Regler PORTC |= (1<<PIN4); // Pullup Key Standby PORTD |= (1<<Enc_A); // Pullup Encoder Pin A PORTB |= (1<<Enc_B); // Pullup Encoder Pin
in
„PPS5330 Labor-Netzteil hack“
·
Mikrocontroller und Digitale Elektronik
·
30.08.2020 13:46
(1<<Up); // Taste "<-" DDRB &= ~(1<<Down); // Taste "->" PORTD |= (1<<ADC_ADW); // Pullup enabled PORTC |= (1<<UI); // Pullup UI switch PORTC |= (1<<PIN3); // Pullup Regler PORTC |= (1<<PIN4); // Pullup Key Standby PORTD |= (1<<Enc_A); // Pullup Encoder Pin A PORTB |= (1<<Enc_B); // Pullup Encoder Pin
in
„PPS5330 Labor-Netzteil hack“
·
Mikrocontroller und Digitale Elektronik
·
29.08.2020 20:27
Thread
buffer_relais[7] = CANMSG; send_relais = 42; // Daten für TB-1 untere Reihe Laden PORTC = buffer_relais[1]; PORTG |= (1 << PG4); // Daten für TB-1 obere Reihe Laden PORTC = buffer_relais[0]; PORTG &= ~(1 << PG4); // Daten für TB-2 untere Reihe Laden PORTC = buffer_relais[3]; PORTG |= (1 << PG3); // Daten für TB-2 obere Reihe Laden PORTC = buffer_relais[2]; PORTG &= ~(1 << PG3); // Daten für TB-3 untere Reihe Laden PORTC = buffer_relais[5]; PORTD |= (1 << PD4); // Daten für TB-3 obere Reihe Laden PORTC = buffer_relais
Mikrocontroller und Digitale Elektronik
· Decoder
· 27.08.2020 15:34
· 17 Antworten
; } // set I-Mess measurement if (mess_ch == I_Mess) { PORTC &= ~((1 << ADC_AD1) | (1<<ADC_AD2)); PORTC |= (1 << ADC_AD0); _delay_ms(50); } // set Temp1 for measurement if (mess_ch == T1_Mess) { PORTC &= ~(1<<ADC_AD2); PORTC |= (1 << ADC_AD0) | (1<<ADC_AD1); _delay_ms(50); } // set Temp2 for measurement if (mess_ch == T2_Mess) { PORTC &= ~((1<<ADC_AD0) | (1<<ADC_AD2)); PORTC |= (1<<ADC_AD1); _delay_ms(50); } // start ADC measurment PORTC |= (1 << ADC_AD2); PORTC &= ~((1 << ADC_AD0) | (1<<ADC_AD1)); ADW_flag = 1; // clear timer register
in
„PPS5330 Labor-Netzteil hack“
·
Mikrocontroller und Digitale Elektronik
·
23.08.2020 19:58
84 bf out 0x34, r24 ; 52 DDRC = 0xFF; 72: 8f ef ldi r24, 0xFF ; 255 74: 84 bb out 0x14, r24 ; 20 PORTC = 0x00; 76: 15 ba out 0x15, r1 ; 21 78: ff cf rjmp .-2 ; 0x78 <main+0xc> 0000007a <_exit>: 7a: f8 94 cli 0000007c <__stop_program>: 7c: ff cf rjmp .-2 ; 0x7c <__stop_program>
in
„ATmega16 Port Ausgabe Problem“
·
Mikrocontroller und Digitale Elektronik
·
17.08.2020 22:20
Thread
Und was hat das mit PORTC zu tun?
> Alle möglichen Zuweisungen an Port C werden > korrekt ausgegeben, einzige Ausnahme: PORTC = 0x00. Da sieht, für mich, nach einem Problem mit der Stromversorgung aus: die Spannung zwischen Vcc und GND direkt am ATmega16 messen, einmal bei PORTC =0 und dann bei PORTC =irgendwas.
Mikrocontroller und Digitale Elektronik
· Volker A.
· 24.08.2020 15:30
· 75 Antworten
Thread
einzelnen Ports bzw Register an. (DDR, PORT, PIN) Hat es einen Vorteil, wenn ich einen PORT (z.B. PORTC ) ausschließlich als Input definiere (alle 8 Bits) und den anderen (z.B. PORTL) ausschließlich aus Output? Oder gibt es eine andere sinnvolle Zuweisung der IO, z.B. IO die viel gepollt werden auf einem
Stevo J. schrieb im Beitrag #6368795: > Hat es einen Vorteil, wenn ich einen PORT (z.B. PORTC ) ausschließlich > als Input definiere (alle 8 Bits) und den anderen (z.B. PORTL) > ausschließlich aus Output? Eher ist das Gegenteil der Fall... Da der maximale Output Strom nicht nur pro Pin
Mikrocontroller und Digitale Elektronik
· Stevo J.
· 12.11.2020 10:15
· 22 Antworten
Thread
return ( ( (64.0*F_CPU)/(16UL*baudrate) ) +0.5 ); } int main(void) { USART0_init(); PORTC _DIR = PIN0_bm; while (1) { USART0_sendString("Hello World!\r\n"); PORTC _OUTTGL = PIN0_bm; _delay_ms(1000); } } void USART0_init(void) { PORTB.DIR
Mikrocontroller und Digitale Elektronik
· Theo F.
· 03.08.2020 23:53
· 23 Antworten
Thread
if(min<=60){} else {min=0; hr++;} if(hr<=12){} else{hr=1;} PORTD = min; PORTC = hr; } } ISR (TIMER2_COMPA_vect) { sec++; }[/c] OCR2A lasse ich auf 0 um die 32Hz zu erzeugen. Allerdings muss ich in der if-Bedingung diesen als Faktor dazu rechnen oder ? [c]if
Mikrocontroller und Digitale Elektronik
· M. S.
· 29.07.2020 22:44
· 17 Antworten
Thread
;Als ganzen Port, diesen Teil anpassen um nur den jeweiligen Bit zu manipulieren out PORTC , r18 ende: reti int_rxc: push r18 lds r24, UCSR0A sbrs r24, RXC0 rjmp int_rxc mov r18, r29 cpi r18, 1 ;Zufallsprinzip
Mikrocontroller und Digitale Elektronik
· BaeumeKommunizierenElektromagnetisch
· 27.07.2020 01:30
· 34 Antworten
byts RB3/MCLR/V PP Stack 2 File RB4/OSC2/CLKOUT Registers RB5/OSC1/CLKIN Program Bus 12 RAM Addr 9 PORTC Instruction Reg Addr MUX RC0 Direct Addr5 5-7 Indirect RC1 Addr RC2 FSR Reg RC3 RC4 RC5/T0CKI 8 Status Reg 3 MUX Device Reset Timer Power-on ALU Decode andon Reset Control 8 Watchdog Timer W Reg OSC1
in
„Funktion Reifendruckanlerngerät EL-50448; OEC-T5; Welches Bauelement ist das?“
·
Fahrzeugelektronik
·
21.07.2020 23:12
Thread
im Beitrag #6342462: >> RS liegt auf PC4, EN auf PC4. Tipfehler! (RS = Register select) <-> PORTC PortBit 4 (EN = Enable) <-> PORTC PortBit 5
> umschaltet und natürlich auch ein Latch? Sory war Tippfehler! (RS = Register select) <-> PORTC PortBit 4 (EN = Enable) <-> PORTC PortBit 5
Mikrocontroller und Digitale Elektronik
· Aloysius P.
· 21.07.2020 11:33
· 37 Antworten
' | CS | Ce | ' | Res | Reset | ' #-------#----------# Config Graphlcd = 128 * 64sed , Dataport = Portc , Controlport = Portd , Ce = 4 , Cd = 6 , Rd = 5 , Enable = 7 , Reset = 3 , Mode = 8 '=============================================================================== '---[Config ADC]---------------
in
„Pollin 16080 Touch mit ATMEGA32 und BASCOM“
·
Mikrocontroller und Digitale Elektronik
·
16.07.2020 21:57
Thread
damit die Schleife nicht wegoptimiert wird } while (i>0); // Ergebnis ausgeben PORTC =i; } [/c] Jetzt wird zwar innerhalb der Schleife i immer schön neu aus dem RAM gelesen, aber zum Schluss wird doch wieder einfach 0 auf PORTC ausgegeben: [pre] 000000b4 <main>: b4: 8f
ATOMIC_BLOCK(ATOMIC_FORCEON) { iRead = i; } // Ergebnis ausgeben PORTC =iRead; }[/c] Hab grad keinen Compiler zur Hand.
Mikrocontroller und Digitale Elektronik
· Bernd K.
· 14.07.2020 13:42
· 91 Antworten
; } // set I-Mess measurement if (mess_ch == I_Mess) { PORTC &= ~((1 << ADC_AD1) | (1<<ADC_AD2)); PORTC |= (1 << ADC_AD0); _delay_ms(50); } // set Temp1 for measurement if (mess_ch == T1_Mess) { PORTC &= ~(1<<ADC_AD2); PORTC |= (1 << ADC_AD0) | (1<<ADC_AD1); _delay_ms(50); } // set Temp2 for measurement if (mess_ch == T2_Mess) { PORTC &= ~((1<<ADC_AD0) | (1<<ADC_AD2)); PORTC |= (1<<ADC_AD1); _delay_ms(50); } // start ADC measurment PORTC |= (1 << ADC_AD2); PORTC &= ~((1 << ADC_AD0) | (1<<ADC_AD1)); // set busy for measurement busy_flag
in
„PPS5330 Labor-Netzteil hack“
·
Mikrocontroller und Digitale Elektronik
·
11.07.2020 14:17
); } // set I-Mess measurement if (mess_ch == I_Mess) { PORTC &= ~((1 << ADC_AD1) | (1<<ADC_AD2)); PORTC |= (1 << ADC_AD0); _delay_ms(50); } // set Temp1 for measurement if (mess_ch == T1_Mess) { PORTC &= ~(1<<ADC_AD2); PORTC |= (1 << ADC_AD0) | (1<<ADC_AD1); _delay_ms(50); } // set Temp2 for measurement if (mess_ch == T2_Mess) { PORTC &= ~((1<<ADC_AD0) | (1<<ADC_AD2)); PORTC |= (1<<ADC_AD1); _delay_ms(50); } // start ADC measurment PORTC |= (1 << ADC_AD2); PORTC &= ~((1 << ADC_AD0) | (1<<ADC_AD1)); // set busy for measurement busy_flag
in
„PPS5330 Labor-Netzteil hack“
·
Mikrocontroller und Digitale Elektronik
·
10.07.2020 16:46
Thread
beiden "nativen" ADC Eingänge (Kanal 6+7) bereits belegt sind, muss ich nun auf die ADC Eingänge des PortC zurückgreifen. Hier ist der ADC Kanal ja als "Alternativ-Funktion" im Datenblatt angegeben. Nun frage ich mich, ob und wie ich den Port konfigurieren muss. Einfach nur den entsprechenden Pin
// A1 -> PC1 #define PINx PINC // #define DDRx DDRC #define PORTx PORTC DDRx&=~(1<<HELLUP | 1<<HELLDOWN); PORTx|=(1<<HELLUP | 1<<HELLDOWN); nach Belieben
Mikrocontroller und Digitale Elektronik
· Minime
· 08.07.2020 10:19
· 5 Antworten
Thread
Danke Leute; Hat sich erledigt! Hab selbst Übel gefunden. Es waren an PORTC außer Datenleitungen von LC-Display angeschlossen. Beim Auslesen von Display wurde Interruptflag von I2C gesetzt. Stand klein im Datenblatt von PIC, dass mit Peripherie verbundene Pins nicht als Ausgang
Mikrocontroller und Digitale Elektronik
· Johann R.
· 13.07.2020 21:17
· 1 Antworten
ADCON0 = 0; // A/D CONTROL REGISTER 0 --> ADC aus OPTION_REG = 0b.0000.0000; // siehe DB; //... // PORTC -Init: WPUC = 0; // Weack-PullUps: 0 = aus; 1 = an; (je Pin ein Bit) PORTC = 0; LATC = 0; ANSELC = 0b.0000.0000; // 0 = digital, 1 = analog TRISC = 0b.1111.1111; // In = 1; Out = 0; // PORTC .0 // I2C_CLK PIN 10 // PORTC .1 // I2C_SDA PIN 9 InitI2C(); //...Init_LCD();... while(1) { // MRT-Wert zu GY-302 schicken if(writeMTR(31)) // wenn Slave nicht antwortet { ClearLCD(); // Display löschen, CursorPosition(2,1); //
in
„I2C Initialisierung (Master) PIC16F1704“
·
Mikrocontroller und Digitale Elektronik
·
01.07.2020 00:07