Questions tagged [microcontroller]

This tag is related to questions that have something to do with a microcontroller. A microcontroller is a simple or small processor often with its program and execution memory on the same chip with input/output pins for controlling other hardware. Please specify the microcontroller and compiler or tools related to your question.

This tag is related to questions that have something to do with microcontrollers in general. A microcontroller is a simple or small processor often with its program and execution memory on the same chip with input/output pins for controlling other hardware. Microcontroller programs are embedded programs often talking directly to hardware registers without using an operating system. Microcontrollers are generally resource limited, program space measured in bytes, kilobytes or megabytes, processor clock speeds often in the kHz and tens of MHz range.

3656 questions
1
vote
1 answer

Correct frequency on TCCR2 Atmega8

I'm new to microcontrollers, so I'm interested is it possible to set correct frequency mode on TCCR2 8bit timer?I need it to control a servo; On TCCR1 I do smth like this: DDRB |= (1<<1) | (1<<2); ICR1 = 20000; TCCR1A = (1<
user3696488
  • 53
  • 1
  • 5
1
vote
4 answers

How to make Timer1 more accurate as a real time clock?

I have PIC18F87J11 with 8 MHz oscillator and I am using timer1 as real time clock. At this moment I have it toggle an LED every 1 minute. I noticed it does work perfect fine the first few times but slowly it starts toggling the LED every 59 seconds.…
Ammar
  • 1,203
  • 5
  • 27
  • 64
1
vote
2 answers

Printing custom characters to LCD

I'm trying to make some custom characters to a 20x2 LCD. I'm using a Atmega µController to control the LCD with 4 bit interface. All my commands to the LCD seems to work fine (except the custom char)? Well my code to create the character are as…
MrSykkox
  • 528
  • 4
  • 14
1
vote
0 answers

Microchip webserver, don't receive ack after HTTP 200 OK frame

My current project is a bare-metal webserver. For this I'm using no libraries, and programming directly onto the chip. What I'm trying to do right now is send a single piece of HTTP data: HTTP/1.1 200 OK\r\n Content-Length: 45\r\n Content-Type:…
TSC
  • 31
  • 8
1
vote
1 answer

The execution of the code always goes into the else statement

Some very strange things happen in my source code. The following function works well and it prints 'y' when the password is correct and prints 'n' when it is incorrect. But if i add some UART1_Write and Delay functions to the else statement the bug…
Ted Tedson
  • 316
  • 1
  • 6
  • 15
1
vote
1 answer

How do I know when I need a dedicated DSP chip?

When designing an embedded system, how can I tell in general when the floating point processing required will be too much for a standard microcontroller? In case anyone is curious, the system I am designing is a Kalman filter and some motor control.…
Dan
  • 12,409
  • 3
  • 50
  • 87
1
vote
1 answer

STM32F2x Is it possible to request multiple DMA streams with single request

I want to setup an application, where a single trigger-factor (compare-match of a timer) shall request mutliple DMA streams (I.e. set new timer-value and send data to SPI) Is this possible with the STM32F2x µC or have you got an idea for a µC with…
1
vote
1 answer

Getting the amplitude of a sine wave from an ADC

I am using an MSP430 microcontroller and I want to find a way to get the amplitude of an input sine wave signal based on the smallest possible number of samples from the ADC. The sampling and conversion frequency of the ADC is about 148 KHz and the…
1
vote
1 answer

conserve stack space when using virtual function calls

I'm currently developing in C++ for an STM32 µC. Basically, I wanted to add a layer of abstraction to i²c in order to have virtual i²c buses that are actually behind a multiplexer on the physical i²c bus. We already had a driver that would combine…
FRob
  • 3,883
  • 2
  • 27
  • 40
1
vote
0 answers

NXP Jennic JN5148 and ZCL home automation profile

Has anyone managed to run the Zigbee Home Automation profile over NXP JN5148? I've tried but the microcontroller seems to be stuck.
Igor Rogi
  • 21
  • 2
1
vote
1 answer

How to change codeoffset?

I know how to change the codeoffset on MPLAB XC8 easily just by going to XC8 Linker --> Additional options -- > Codeoffset How do I change it on MPLAB V8.92 with C18 compiler? I am using PIC18F87J11 if that's helpful. I opened the linker file and…
Ammar
  • 1,203
  • 5
  • 27
  • 64
1
vote
2 answers

Arduino Uno to Micro SPI pinout remapping?

Web developer going into hardware so please, be gentle. Problem: I'm currently trying to use the BlueFruit LE breakout board and an Arduino Micro, however the pinouts are different as the Micro has dedicated SPI pins whereas the UNO has SCK, MISO…
canacast
  • 231
  • 8
  • 23
1
vote
4 answers

Error message in AVR studio4

I have recently purchased an AVR USB programmer from robokits.co.in, was trying to program atmeg8 using AVR studio4 and I get the following when I click on the program options: a problem occurred when executing the command. make sure u are using …
Supandi43
  • 11
  • 1
  • 5
1
vote
1 answer

How to implement a process regulator in C/C++?

The question is quite simple and I don't know where and how to implement the transfer functions. Let's say that I have a classic system where P has a transfer function of the second order with zita=0.7, F=1 and C is the process regulator. I would…
tzortzik
  • 4,993
  • 9
  • 57
  • 88
1
vote
1 answer

Displaying picture on microcontroller's screen

Hi I am trying to let my picture (that has a size of: 40 x 42) take more space that’s available on my microcontroller, because as you can see my face is pretty small on the screen: The first thing that I had tried, was to use a bigger picture with…
superkytoz
  • 1,267
  • 4
  • 23
  • 43
1 2 3
99
100