Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
214 views

Can't correctly print to serial UART using AVR-c on ATmega328P Arduino Uno

I'm trying to program an ATmega328P Arduino Uno "bare metal" to print to serial over the USB connection to my computer, however I only see replacement characters (�) being printed, both when ...
Troglobyte's user avatar
0 votes
0 answers
75 views

4x4 keypad scanning with AVR and displaying results to LEDs, issues with hardware

trying to program a 4x4 keypad to display hex value on the board I have. any time I output to the board every, it defaults to 0xFF. So far ive tried addling longer delays between key pressed and ...
dylzad747's user avatar
2 votes
2 answers
136 views

When an embedded c program is created, why is there extra machine code around my compiled c program?

This C program blinks an LED attached to an AVR ATmega32u4. ISR(TIMER1_OVF_vect) // attach Interrupt Sub Routine to TIMER1 { // toggle LED PIND = (1 << PIND5); // #define PIND (*(...
Johnny Jones's user avatar
1 vote
2 answers
132 views

AVR128DB28 communication with SD card over SPI failed

I am trying to achieve communication between an AVR128DB28 microcontroller and an SD card over SPI.I'm programming it in Microchip Studio, programming is done through an MPLAB SNAP over UPDI. The ...
n0rmi's user avatar
  • 111
-1 votes
1 answer
410 views

How to write to ATmega328P EEPROM without supporting libraries?

IMPORTANT NOTE: I do not want to use a library to achieve this. No "avr/io.h" and no "avr/eeprom.h". I want to learn how to implement libraries like these. Problem: Let's say I ...
dev_jeb's user avatar
0 votes
1 answer
142 views

Issue related to delay in ATmega4809 Curiosity Nano Board

I'm new to "ATmega4809 Curiosity Nano Board", I was trying the simple Blinking of LED with a delay of 1second. But the delay which i achieved is 1.24seconds. How do I regulate this ? Please ...
Asha's user avatar
  • 1
1 vote
0 answers
88 views

Can't read input from a pin in Arduino ATmega2560

I'm tying to read the data from a HC-S501 PIR motion sensor connected to pin 7 of an Arduino ATmega2560. The code I'm using is: int main(void) { int pir_out; pir_out = 0; DDRH &= ~(1 &...
PacoFrost's user avatar
0 votes
0 answers
241 views

How to build a C code for AVR ATmega32 microcontroller to measure power using ZMPT101B voltage sensor and SCT013 current sensor?

I'm constructing a device to measure power and display in a 16x2 LCD in a given power source. I'm using the above mentioned sensors to read current and voltage through ADC in ATmega32. Voltage sensor ...
Upuli Indula's user avatar
2 votes
1 answer
255 views

Weird behaviour when enabling interrupts for CTC mode onTimer0 on ATtiny85

I'm using an ATtiny85 for a simple IR project built on C (an IR remote for a DSLR camera). I generated a 38.4 kHz square signal using Timer 0 in CTC mode and set the output to toggle PB0 every time ...
Mauricio Aravena's user avatar
1 vote
1 answer
219 views

Wrong value using the ADC with Attiny84

I am using an Attiny84 with an LM335z temperature sensor to create a temperature sensor. Using the ADC, I obtain the voltage value and perform the necessary conversions to obtain the temperature value....
MrNando's user avatar
  • 11
4 votes
1 answer
1k views

Why can't I change the PWM output pin in ATTINY1616?

I have started to dive into MCU programming and have been working with some basic codes. I first did it with Arduino but now I'm trying with an ATTINY1616 MCU and I'm hardstuck in how to create a PWM ...
Collapsedblock6's user avatar
3 votes
1 answer
161 views

ATtiny416 SYNC Signal Generation

I am trying to code a ATtiny416 to perform the following function with the following inputs; Purpose: Transmit a Byte message of '0x01' every X amount of clock cycles, from the input of an external ...
CS010101's user avatar
-2 votes
1 answer
57 views

Get data from channel 3 and send the least 8 bits to port B

Get data from channel 3 and send the least 8 bits to port B. Meanwhile transfer data from PINC to PORT D. Prescaling = 32 Vref = 5V ADLAR = 1 This is a question that concerns ADC in AVR ...
Reim Oss's user avatar
-1 votes
2 answers
271 views

Why does this AVR code for ATMega128 behave the way it does?

I have the following code for ATMega128: Some libraries and functions are not used as I haven't completed the code completely because I am stuck at this problem for days now. #include <avr/io.h> ...
STT's user avatar
  • 59
0 votes
0 answers
1k views

How to find correct port in linux and specify it in platformio

So I'm currently having trouble with selecting the correct upload port in the platformio extension using VS Code. PIO is automatically detecting /dev/ttyS0 as port which is not correct and produces a ...
user's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
16