Questions tagged [microcontroller]

1

votes
0

answer
164

Views

Generate a sine signal with time dependent frequency in C

I want to generate a sine signal with a time dependent frequency that varies periodically between fmin and fmax with a frequency f0 in C. Mathematically, this can be described by y(t)=1/2*(1+sin(2*Pi*(fmin*t + (fmax-fmin)*1/2*(t - 1/2/Pi/f0*cos(2*Pi*f0*t) + 1/2/Pi/f0)))) Because I want to use this o...
Peter123
1

votes
1

answer
81

Views

Why is the LED blinking without any physical interrupt?

The following is the interrupt handler for LED0 to toggle when an interrupt occurs on the UART0 due to LIN transmission from master to slave, my device is the slave. But without connecting my device(slave) to the master that means without any LIN transmission over UART, the LED0 is toggling. I canno...
j.aug
1

votes
0

answer
49

Views

DCF77 on BeagleBone - Get Time Signal and decode it

I want to have a RTC on my BBB. I wired the DCF77 on the UART4. Can you tell me how can I read the signal of the DCF77 and decode it on the BBB ? Thx
Ben Jo
1

votes
1

answer
179

Views

How to loop in NIOS II Assembly

So what I am trying to accomplish is to get the LEDs on my micro controller to flash back and forth using a loop. So far I have been able to get the LEDs to flash from right to left using this code .equ LEDS, 0x10000010 .text .global _start _start: movia r2, LEDS movi r3, 0b10000000 movi r4, 0x7FFF...
Mark.B
1

votes
0

answer
40

Views

Arducam Errors: Bogus Huffman Table

I am working with an Arducam OV2640 to capture images and transmit from one microcontroller to another. I am getting inconsistent images. Occasionally they turn out ok but a large portion of the time they have a 'bogus Huffman Table'. I am familiar with Huffman tables which has me guessing that I a...
Alex Colpitts
1

votes
0

answer
158

Views

STM32F415 Problems with I2C

I am using a STM32F415RGT6 embedded in the 1Bitsy Board. I want to set up the I2C Peripheral in order to read some data from a sensor. I am using the stm32f4 standard peripheral library. My example code: RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE); GPIO_InitTypeDef gpioInit; GPIO_StructIn...
Dustin Lehmann
1

votes
2

answer
110

Views

Flushing data cache (dcbf assembly instruction)

Context: I currently want to flush my L1 DATA cache (target: NXP P2020 Qoriq e500). I have an issue while using 'dcbf' instruction: dcbf r3, r4 // with r3 and r4 defining the address of the DATA cache Issue: My problem is that I don't know what parameter to give to this instruction to reach the DA...
Umaiki
1

votes
0

answer
43

Views

Change PIN mapping for UART in the code for nRF51

While communicating with one serial device, I would like to send some information to another serial device (after finished with the first one). How can I change pin mapping (my own built boards) for UART while running the code for nRF51822 (g_ADigitalPinMap)?
MrEspin
1

votes
1

answer
341

Views

MPLAB XC8 Compiler PIC18F452 Multiplexed Seven Segment Display Code working properly

I am currently working on a code involving the MPLAB XC8 Compiler, PIC18F452 with a Multiplexed Seven Segment Display. I want to use two pushbuttons connected to pins RB2 and RB3 of PORTB of the PIC18F452 to increment and decrement a variable 'count' and display this number from 0 to 99 on this disp...
psychotropix
1

votes
1

answer
48

Views

BLDC Isolated sensorless control

I've currently developed a BLDC motor controller and it generally works fine. During some events however the microcontroller locks up (e.g. stopping the motor or fast changes of duty cycle). Because of this, I want to isolate the microcontroller from the power side (i.e. isolated supply and optocoup...
Pyrohaz
1

votes
0

answer
23

Views

The timer clock rate of the AT89S8253

I use a AT89s8253 with a crystal of 24MHz. I assume that the X2 mode is not active since X2 bit = 0. What is the timer clock rate? 1MHz? or 2MHz?
Alain Paré
1

votes
0

answer
93

Views

Using Serial Peripheral Interface (SPI) to talk to several slaves simultaneously

I have four Atmega328p in a single board and I want one of them send the same data (i.e. sensor readings) to the other three simultaneously. I'm not interested in a bidirectional communication. I read this thread (How can I broadcast data to multiple SPI slaves and how it works?) about SPI broadcast...
1

votes
0

answer
166

Views

Stuck in a function in a source file from example code

I'm developing a program on a NRF52832 microcontroller in c in the Netbeans IDE that receives data from an external ADC via SPI and outputs a PWM signal with a duty cycle that depends on the data from the ADC. I got the example code for the SPI driver and the PWM driver working in separate projects...
Payton Grenich
1

votes
0

answer
42

Views

How to read data from MPU6050 using SAM4S

I'm trying to read information from an MPU6050 sensor using the SAM4S-EK2 dev board, with an ATSAM4SD32C microcontroler, showing the data in the on-board LCD display. However, when I try to read the data, the received value that shows up in the LCD is always the same. What am I doing wrong? I'm usi...
V. Souza
1

votes
0

answer
76

Views

HCS12 INTERRUPT

Shown below is a switch connected to the IRQ or XIRQ pin of the HCS12. Write a program to get the status of the switch and increment a counting sequence on the 7-segment display each time the key is pressed. The switch should be connected to IRQ/PE1 or XIRQ/PE0 of the Trainer (Dragon12P), namely pin...
1

votes
1

answer
382

Views

PIC16F84A Switch Toggle

Hello i'm trying to make a circuit where in my microcontroller i am trying to toggle an LED on or off by the push of a button. I am trying to toggle LED pin D2 with the button in RB0. This is my circuit heres is my code: STATE EQU 0DH ;set up BSF STATUS, RP0 CLRF TRISA MOVLW 01H MOVWF TRISB MOVLW...
JezT
1

votes
0

answer
113

Views

Problems in linux kernel porting, stuck in paging_init function

reference board : i.mx6q sabresd, kernel version : 4.9.17 Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.9.17-04736-ga88711e-dirty ([email protected]) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #6 SMP PREEMPT Sun Jul 8 12:13:44 IST...
mrigendra
1

votes
0

answer
17

Views

How to access Jamara 038300 qcr?

I've got a Jamara 38300 qcr quadrocopter but not controller for it. I want to control it with a ps3 controller, an app or just via windows Bluetooth. How can I achieve this? I know that the quadrocopter sends with a 2.4 GHz frequency and the on board microcontroller is a SMT8S005K6. Can I just catch...
user10050330
1

votes
1

answer
31

Views

No C32 compiler option for PIC32MX270F256B

I am trying to compile a code written for PIC32MX270F256B. For this I want to use C32 compiler in MPLAB X IDE V4.15. I am using C32 compiler successfully in all other projects but weirdly enough there is no option for C32 compiler for my PIC32MX270F256B. I can't figure out the reason behind this. Pl...
1

votes
0

answer
46

Views

Magnetometer biases issue

I am using lis3mdl magnetometer in my quadcopter project to compensate gyroscope drift. Unfortunatelly Im having problems probably with calibrating. Ive achive max and min values (what is weird they are 14 bits instead of 16) and calculated biases like that : biases[i] = (MAX_VALUES[i]+MIN_VALUES[i...
1

votes
1

answer
668

Views

How to implement OTA update failover scenario for STM32F4 microcontroller's flash banks?

I am using the 32bit ARM STM32F439ZI microcontroller for my project. The microcontroller has 2 megabytes of flash memory organized into 2 banks of 1 megabytes each for simultaneous read and write/erase, as the datasheets points out. I want to introduce Over The Air (OTA) firmware updates for the mic...
burnersk
1

votes
0

answer
345

Views

STM32: usart IAP

I'm trying to use example code provided by X-CUBE-IAP-USART package to develop IAP FW for STM32L0xx device. I'm using STM32L073 Nucleo64 board for development. When I send compiled FW using TeraTerm's YMODEM protocol nothing happens. Only thing that is being send to target STM device is: 'ota_test.e...
Pavol Dudak
1

votes
0

answer
173

Views

missing device or architecture after '-mmcu='

I'm using an Arduino package called Arduino-makefile or Arduino-mk to program Arduino Uno from the command line. Recently I wanted to program an ATtiny85 microcontroller (MC). This is my makefile: ################ MAKEFILE ################################### ARDUINO_DIR = /usr/share/arduino ########...
Ramazan
1

votes
1

answer
35

Views

Javascript data not in correct cell

I am implementing a server on an STM32F4 MCU and am having issues with the javascript. The controller responds to the the character 's' with the following 'text/javascript\n\nvar CH1= 789' The browser is not putting the value (789) in the correct cell as shown in the image below, its outside the tab...
MXG123
1

votes
0

answer
63

Views

NXP NFC NDEF Tag memory size issue

I am using NXP NDEF tag and NFC Tag writer app given by NXP but in sony phone app show memory 524 byte but in MOTO mobile show as 52 byte memory. I am finding solution more than time but not resolved it. Please help me find out it. I use the following code to read memory: Ndef ndef = Ndef.get(tag);...
The Ray of Hope
1

votes
1

answer
85

Views

Control 4 digits 7-segment LED interfacing MCU 8051

I have some error while reading the voltage displayed on 7-segment LED. The PCB was designed by another person. They didn't assign the 7-segment LED pins to the same port on MCU. Herein, I assume the MCU code is correct. But the LED displayed wrong voltage value. I have a question first. Can we conn...
Hector Ta
1

votes
0

answer
51

Views

Keep alive messages transmitted from a UART device in my system to the CPU don`t arrive once in a while only when another process is running

I have a STM 32F microcontroller which is connected to a X3399 core board via UART. Every 400 ms I`m sending a keep alive message from the micro controller to the board, once in a while, asynchronously, the keep alive message is not received on the processor side. This phenomenon only happens when a...
ShirBar
1

votes
0

answer
24

Views

GDB PEMicro interface debugging not showing up

I recently installed Kinetis Deign Studio 3.2.0 on Mac OSX High Sierra and am I trying to flash a FRDM-KL26Z (am studying this at the University and everybody use Windows, unfortunatly). I installed the GDB PEMicro packs, but the problem is that the only configuration that shows up into the Flash Co...
ics
1

votes
1

answer
302

Views

How to find amplitude and frequency of sine wave from 20 samples? [closed]

I have signal with these parameters: 1kHz frequency, 1Vpp. I'm trying to find the best algorithm to calculate the signal's amplitude and frequency from 20 samples. I will try to implement this algorithm in C language (on my microcontroller). I've estimated the sampling frequency to 2.5kHz Pic of sa...
Void
1

votes
0

answer
38

Views

How can I solve this board communication problem with my Arduino Nano?

It has the ATMega328P chip on it. I'm constantly trying to upload some code to it but I'm still getting errors. Everything in the IDE is selected as it should. Board type, processor and port. Also, drivers are up to date. Though, I'm still getting errors like: avrdude: stk500_getsync() attempt 3 of...
Christian Johrend
1

votes
1

answer
29

Views

TI CC2650STK - how to control onboard LED through iOS app

I am using this code from this repository: https://git.ti.com/sensortag-ios-source-code-example/sensortag-ios-source-code-example I am trying to turn on the red onboard LED of the CC2650STK when the object temperature sensor exceeds 30°C and turn it off when the temperature is below 30°C again. I'...
aliceP
1

votes
1

answer
40

Views

Is it possible to compile programs in visual studio which are created in CCS ver8.0

I have implemented MSP430F2418 controller program in Code Composer Studio version 8.0. Now I want to use the same code in Visual Studio 2017. Is it possible to use visual studio? If it is possible, kindly give information how to run in Visual Studio 2017.
k.madhu
0

votes
1

answer
11

Views

When programming my Atmega644 MCU. Why does PORTD |= 0b00100000 work, but not PORTD |= (PD5 <<1)?

I have been trying to understand why the line PORTD |= 0b00100000; works, but not PORTD |= (PD5
sss
1

votes
0

answer
86

Views

How to nullify variation in resistance due to temperature for ADC in a micro controller?

I am reading analog voltage which is in band of 1V to 1.7V through ATMega8 uC. This is read with internal 10 bit adc and 2.56V reference voltage. So 1V corresponds to 400 ADC output internally. Since I am using divider circuit to measure this voltage through port, the fluctuation in voltage due to v...
Vishwesh Mangalore
1

votes
2

answer
61

Views

How to cross compile GSL library for arm-none-eabi-gcc?

I need to use the GSL library in my program on LPCXpresso 4367(ARM CORTEX M4). I tried to follow the library linking procedure for LPC xpresso but the MCU linker is giving me these errors: MCUXpressoIDE_10.3.0_2200\workspace\test1\Debug/../src/test1.c:53: undefined reference to 'gsl_linalg_LU_decomp...
Shreyas
1

votes
0

answer
76

Views

How can I wake the ESP32 when there is a change on the hall effect sensor?

I'm trying to detect changes in the readings of the ESP32's internal hall effect sensor using the ULP. I've tried writing some assembly for the ULP to get 4 samples from the ADC, add them, and compare to the previous loop's sum. If the difference is greater than a macro value (DELTA), the loop ends...
hexaguin
1

votes
0

answer
32

Views

LUFA XInput Controller Endpoint IN/OUT not working

Intro: I've been trying (and failing for four entire days straight so far) to get my Atmega32u4 device (Arduino Pro Micro) to emulate an Xbox controller. It doesn't have to pretend it's an Xbox controller, but I need to communicate with the XInput driver, so emulating an official controller seemed l...
1

votes
1

answer
107

Views

How to receive JSON response from REST API using ESP8266 Arduino framework

I am trying to use Beyond Verbal RST API to post voice sample data over HTTP post method from ESP8266. The first step for the API communication is to get access token using the POST method. You can check the following codes. With this code I am just getting 'failed to Post' response on serial output...
sr.supto
1

votes
1

answer
53

Views

How to get a hard fault exception with a simple or instruction on arm

Currently we are hunting a phantom, which is in the form that when we compile in some code (without calling it) one specific call to memset generates an hard fault exception. The address and length given to memset are valid. Stepping through it in single instruction mode showed that it always fails...
Rudi
1

votes
0

answer
54

Views

LCD interfacing with ARM cortex M0+ lpc845

I'm trying to interface 8x2 lcd using parallel interfacing[4 bit mode], Display used - 8x2 lcd [PC 0802--A] ST7066U--Dot Matrix LCD Controller/Driver Since i'm trying to interface using GPIO pins, not using I2C or SPI interface, and since no drivers are there for this particular MCU[LPC845], I compa...
user2293738

View additional questions