C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C ...

learn more… | top users | synonyms

0
votes
1answer
30 views

microcontroller doesn't work with Nokia 5110 LCD (PCD8544)

I'm struggling with my first AVR microcontroller - AtTiny85 to make it work with the known Nokia 5110 display. I wrote my own code to handle the LCD, it didn't work. Then I tried a code found ...
1
vote
0answers
25 views

USB library usage clarification

I'm using an USB library from CCS on a PIC18F, but I don't understand this comment on that library. Added USB_ISR_POLLING support. Define this and interrupts will not be used. usb_task() ...
1
vote
1answer
42 views

How to wait for '>' in SIM900 message format

Hello all I am trying to send sms using SIM900 and PIC18F2520. I have button attached to pin of MCU. So whenever the button is ...
1
vote
1answer
29 views

Is it really necessary to manually clear the XMEGA timer overflow interrupt flag?

As some of you may know, Atmel provides a software framework (mainly as part of Atmel Studio) that provides drivers and examples and is updated on a more or less regular basis. In a recent update ...
1
vote
0answers
47 views

Error sending SMS to SIM900 in PIC

I am trying to interface SIM900 with PIC18F2520. I need to send SMS to a particular cell number. According to AT commands, ...
1
vote
2answers
74 views

C code for Xbee communication

I am using the following code to communicate with another arduino connected to an Xbee: ...
1
vote
2answers
97 views

Bit-Structured Registers for Embedded Hardware

So I've designed a piece of hardware that has an Atmega168pa microcontroller communicating with an external IC over an SPI bus. The external device has a few registers, with hardware mapped bits. I'...
-3
votes
2answers
54 views

rotation counter [on hold]

I am tried to make a rotation counter (for measuaring the rotation of a wheel) by IR TX and RX based. I am using 8051 controller using keil c51 compiler My problem some time the measuring or counting ...
0
votes
1answer
31 views

Passing port/pin to a user defined function in 89c52 code

I want to pass a pin value in user define function in 89c52 code like given below ...
4
votes
1answer
105 views

STM32 Sleep Mode: Interrupt gets executed but the CPU stays in WFI

I'm fairly new to the ARM architecture and I'm working with a board that contains STM32F0 microcontroller and an RF modem, which sends an interrupt every time it receives a message. I'm trying to ...
0
votes
1answer
51 views

C code for analog read of SD24 ADC (MSP430I2041)

I am trying to read the output of the ADC into an array by taking the output from the memory register but for some reason it is not working, the array values stay as 0: ...
2
votes
1answer
60 views

XC32 optimizes vaiable used for register reading

I am facing a problem with XC32 compiler's optimization. Whenever I write a function to read something from register, XC32 optimizes (read: Removes) the variable which holds the return value. I have ...
3
votes
2answers
77 views

Pic16 Timer0 puzzle

INTRO The whole point of a timer with overflow interrupt is that the interrupt will trigger on a precisely timed interval - so long as the code executed in the interrupt doesn't take longer than the ...
0
votes
0answers
14 views

creating port pin's Array in Hi-tech C

I am using pic16f887 microcontroller and using Hi-tech C compiler. I want to implement port pin's Array in Hi-tech but it is not allowing me to do so. What is the correct way to access pin address ...
0
votes
0answers
54 views

Program stoping at the end of function STM32 Cortex M4F

My program is stopping at the end of a pop operation for my ring buffer on 0x0800e7b6, everytime I reach that part of the program it stops. I am using FreeRTOS, STM32F407IGH6 and Atollic TrueStudio ...
0
votes
0answers
79 views

UART baudrate steps

I'm trying to connect 2 devices to each other based on the UART peripheral. First one support up to 1.875 Mb/s & the other one up to 1228.8 KBd. Both work correctly on the 115200 but I need more ...
0
votes
2answers
137 views

How to check float as hex value?

I am reading 4 bytes from EEPROM to make a float value. The specific eeprom I use(24Lxx Series) has 0xFF as default value. So, if I read four bytes of 0xFF into float variable, it will have ...
1
vote
0answers
44 views

The 4-wire resistive touch is connected to the ADC's input but it doesn't give correct value

I've an STM32F103 MCU and a 4-wire resistive touch. this is the circuit I've wired up: I've written this code: ...
0
votes
1answer
36 views

How to properly set HIGH/LOW PORTC3 on ATmega32A?

This simple program for ATmega32A is expected to work in this way: Set PORTC 0,1,2,3 as Output pins Set PORTC 4, 5, 6, 7 as Input pins with pull ups Turn on/off output pins 0, 1, 3: 3a. If input pin ...
0
votes
0answers
47 views

Writing a simple boot loader in C for PIC

Say you have a device that you can read from that contains the new code. What I want to implement is the following: Check time stamp and checksum of current code in the pic Check time stamp and ...
0
votes
1answer
51 views

CLOSED-Custom IP register address location

In my current IP, I am trying to transmit the data(data1 and data2,each 32bit) from the PS to the custom IP.At first, I wrote the data1 to the base address 0x43C00000 and read at slv_reg0 and it is ...
0
votes
1answer
68 views

ADC with DMA not working

I am using dsPIC33EP512MU810 to simultaneous sample 4 signals from a mic and display the samples on the on-board tft screen on the EasyPIC Fusion v7 development board. I was successful in acheiving ...
0
votes
0answers
49 views

STM32F030F4P6 - Application Not Starting

I have been developing code to control an LCD using STM32F030F4P6 mcu. So far everything was working fine. However I just added some new code with timer, and now when I uploaded the updated code, ...
1
vote
1answer
99 views

Faulty display behavior using a Atmega328 due to (wrong?) logic voltage level

I have built a little circuit using a Atmega328P to drive a DD-32645C-2A display using a connector board. The display uses a SSD1303 driver. So here is my circuit: Pretty straight forward, I ...
0
votes
1answer
108 views

STM32F4 HAL I2C only sends address

I am working on a project where I need to set a simple LCD. This LCD use the 'ST7032i' chip to control the LCD. I want to control the LCD over an I²C interface. As controller I use a STM32F4 ...
0
votes
1answer
44 views

IEEE 754 standard and C language float data type [closed]

Is IEEE single precision floating point numbers equal to the float data type numbers in C language. Is there a way to check this
2
votes
0answers
75 views

XC8 pointer issue

I am struggling with the following code: ...
0
votes
1answer
34 views

Xilinx XPS : On what bases the AXI master changes AWSIZE/ARSIZE…?

I have built my system with AXI interface using AXI4 From XILINX PLATFORM STUDIO(XPS). I used 32 bit data and address buses.I am facing problem with respect to xSIZE. In firmware(SYSTEM C), I have 8 ...
4
votes
1answer
58 views

How to check beacon's signal strength - nRF52832?

I want to check beacon's RSSI using my nRF52832 (PCA10040) and if the signal is strong then send beacon's MAC over UART to WiFi module. I'm having hard time understanding Nordic Semiconductor's ...
0
votes
0answers
65 views

STM32F107 and mems LIS3DH spi data exchange problems

I'm trying to configure LIS3DH chip via SPI interface. Here is my code: ...
0
votes
0answers
74 views

Question about data transition in UART - Using HAL Drives - STM32F4

*Anwser at the end. I am working with SMT3240G-EVAL, I am working on a project in which I want to be able to send and receive messages using UART. I am starting with embedded development so I don’t ...
1
vote
1answer
103 views

JPEG compression on Cortex M4

Is it possible to perform JPEG compression on a Cortex-M4 MCU? Are there existing libraries that can do this and can accept a 10-bit RAW RGB?
0
votes
0answers
22 views

Xbee ansi c with stellaris

I've been working with xbee and the stellaris launchpas, specifically with the tiva123. I would like to know how do I add the xbee ansi C library into my ccs project, as this library doesn't support ...
11
votes
3answers
2k views

What resides in the different memory types of a microcontroller?

There are different memory segments to which various types of data are put into from C code after compilation. I.e: .text, .data,...
0
votes
1answer
50 views

Loading a HEX file with PICkit 2

I'm trying to upload a hex file, generated from multiple C source files with xc8 in Proteus, into a PIC18F4520. Usually, I don't have any problems doing this but ...
0
votes
0answers
45 views

STM32 communicating with LCD module HY28B

I'm currently in trouble with displaying something on the HY28B LCD module . I configured my LCD module in 16bits mode by soldering the right short at the right place and I'm using an STM32 discovery ...
0
votes
0answers
48 views

Using the interrupts of ATmega16

I am using CodeVisionAVR and I'm trying to write an ISR which should do a specific job for me. the problem is that first time that the ISR is called, it works properly but for next time it does not. ...
0
votes
1answer
50 views

FIFO ASF drivers and USART avr problem sending and recieve data via rs232 connection

I'm working to send frame of 8 bytes to Micro-controller Xmega128a1 (via RS485). The frame looks like this: {header1,header2,CMD,D1,D2,D3,D4,CRC} For example: <...
0
votes
1answer
67 views

RTC in MSP430 microcontroller

I'm trying to generate a 15 minutes alarm using RTC in MSP430F5438A microcontroller from Texas Instruments. What values should I put in the Interrupt registers. I have tried putting 0x95 in RTCAMIN ...
-1
votes
2answers
73 views

Methods of testing interrupts

I am maintaining and developing software in C for S12X micro controllers. The ISR for each interrupts (like I2C, Timer Interrupts etc) are very lengthy, like around 20 to 30 lines with several ...
0
votes
1answer
59 views

PIC18F2550 PWM Square wave generator

I am trying to generate a square wave on 50% Duty Cycle using my PIC18F2550. The signal is to be outputted through a loudspeaker. The frequency does not really matter, as long as it is in the hearing ...
-5
votes
1answer
87 views

Atmel studio coding [duplicate]

I am new to atmel studio, and want to know the best way to code this example: What is the difference between using: DDRG |= (1<<DDRG3) vs ...
1
vote
1answer
36 views

UART issue with receiving a char

Currently I am working with two MSP430G2553 Microcontrollers for a school project and I have to use UART to have them communicate with each other. The transmit MSP430 is to send a character whenever a ...
1
vote
1answer
82 views

Digital filter implementation in C (embedded)

I am a recent grad and my new project at work deals with taking the signal from an electret microphone and getting SPL values for 10 standard frequency bands. The analog amplification/conditioning is ...
0
votes
0answers
69 views

Can't get I2C to work with DS3231 and MSP430 due to hanging issues

I am currently using an MSP430G2 processor. I am trying to get I2C communication between it and a DS3231 timer chip to work properly. ...
0
votes
2answers
92 views

Integer division and scaling an input

I'm trying to get my head around integer division. I'm entering a decimal number between 100 and 6300 into my program, I then need to scale this number by 100 and output the result as a 6-bit number. ...
5
votes
3answers
404 views

Writing to pins on a port without affecting other pins on that port

I'm outputting a 6-bit number on PORTA (RA0-RA5), how do I write to those bits without messing up what is already on RA6 and RA7? For example if I want to output 0x3F on bits RA0-RA5. If I use ...
-9
votes
1answer
75 views

How to interface water sensor to LPC2148 ARM 7 kit? [closed]

I am making a prototype of automatic car wiper system using lpc2148 kit as a part of my course project, but I am unable to find the code (.c format) to configure the water sensor. There are some code ...
1
vote
1answer
327 views

Programming pattern to generate VGA signal with micro-controller?

I want to generate VGA signal with micro-controller (like TI Tiva ARM which runs at 90/120Mhz speed). I'm not sure how to make accurate timings with micro-controller. Which programming pattern I need ...
0
votes
2answers
129 views

Moving from assembly to C [closed]

About four years ago i stumbled upon some electronics projects on the internet and ever since i fell in love with it. So I started at basic circuits then moved to analog circuits and spent very little ...