About 7,830,000 results
Open links in new tab
  1. C - AVR - Simple PORTB, DDRB, PINB explanation - Stack Overflow

    I am working on a school project and need to learn the basics of C with an AVR ATmega controller. I don't understand how everything is set up. For example, PORTB, PORTD, DDRB; …

  2. Issue with the delay and the toggle on PIC16F84A micro

    May 20, 2024 · xorwf PORTB,F ; Show current 4-bit count on PORTB goto MainLoop ; ; Wait 4 milliseconds Wait4ms: movf T0_Sample,W subwf TMR0,W sublw T0_COUNTS_PER_TICK …

  3. Why bit shifting is written like this in C? - Stack Overflow

    Oct 23, 2021 · PORTB = PORTB & ((0b11111011)); This means it will take the old value of PORTB and just write bit #2 of it to 0 while keeping the rest of the bits to their original values …

  4. PORTB and INT external interrupts stucks the code

    Dec 28, 2022 · Four of the PORTB pins, RB7:RB4, have an interrupt-on-change feature. Only pins configured as inputs can cause this interrupt to occur (i.e., any RB7:RB4 pin configured …

  5. Explain this code regarding AVR port setup - Stack Overflow

    Feb 19, 2013 · Note, that the PORTB register bits serve different purposes depending on the pin direction configured via the DDRB register. For output pins, it simply controls the pin state.

  6. How can i set selected pins for PORTC in ATmega328P as inputs in …

    Nov 17, 2023 · OUT DDRB, R17 ;whole PORTB is now configured as output for LED ; PORTC is still whole setup as input because it is default state after reset LDI R16, 0x00 OUT DDRC, R16 …

  7. Assembly movf & movwf - Stack Overflow

    May 28, 2013 · This should move the value of PORTA to PORTB: movf PORTA, W movwf PORTB It's a bit unclear from your question whether you want to move the value as-is, or if …

  8. How to check if a certain PIN on PORTx is pressed

    Oct 18, 2020 · So I have an assignment that wants me to perform certain code when a button on PD2 is presed. The problem i'am having right now is i don't really know what to check for …

  9. How to set a port as input or output with PIC? - Stack Overflow

    Oct 12, 2016 · An individual port corresponds to all of its associated pins. For example, on the PIC16F57, you have pins RA0,RA1,RA2 and RA3. These pins correspond to PORTA bits 0, 1, …

  10. Reading input pin of pic microcontroller with MIKROC

    Mar 25, 2015 · I need to write a program that will check if an input pin of PIC has a voltage. If a voltage exists then it will give voltage to a selected output pin like PORTB.RB1=1;. Else it will …