Peer-to-peer, engineer-to-engineer questions and answers from the EDABoard.com engineering community around microcontrollers. Click the “Read more” link and follow the entire conversation and maybe add your two cents by logging in to EDAboard.com.
PIC16F877A ADC interrupt not working – I am using PIC16F877A to light up an LED I use ADC interrupt but the LED doesn’t light up. here is my code please help me. Read more
Convert accelerometer data into G with the ADXL345 -Can anyone please guide me through the specification of the accelerometer? I need to be able to convert the accelerometer data into G. X-axis Y-axis Z-axis -28 -26 218. Read more
Writing a program within ISR – I am implementing a PID controller and want to execute PID algorithm within an ISR. I have used the timer to trigger the interrupt . My problem is how to keep ISR program small and how to redirect to other handler to deal with the PID. Secondly, the variables need to be global in order to correctly estimate the output value. Read more
TFT LCD touchscreen interface with Arduino mega 2560 board – Did anyone have the sample code to edit the value in the touchscreen and store that value in a register? I am using Sainsmart 3.2 inch TFT touchscreen with Arduino mega 2560. Read more
GSM module sending Garbage value – When the antenna is connected to a GSM module, it starts giving garbage values. And if you want to execute any commad it starts giving this +CREG 0 then +CREG 2 after that +CREG 1. GSM is connected to PC using USB to TTL converter. Read more
7 Amp heater and PWM using MOSFET – I’m working on a project that controls 12Vdc 7Amp silicon heater pad using MOSFET. I tried HA210N06 MOSFET with a heatsink but it doesn’t work correctly, the heater doesn’t get hot but the MOSFET is getting very hot, I tried another lower amper heater it’s work but also not get very hot with a 100% duty cycle as I connect it directly to the power supply. Read more
Unable to understand a part of code for ARM – I was going through Mazidi’s STM32 book and came across this code. This is basically a code to blink an LED with .5 sec on /off period. The code in bold letters seems to be a clock generator. Depending on the value passed to delayMs routine by the main program (here it is 500) the clock pulse gets generated. In this case, it seems to generate an on/off pulse of 1 sec time period with 50 % duty cycle. I am unable to understand how this clock pulse generation code works. How has the upper limit of I (3195) been calculated? As per the other examples in the book, the same code is used to generate a clock pulse of 8ms etc (by passing n=8 to delayMs from main program). Read more
Unable to program PIC18F4550 through Pickit3 – I use the pickit3 connected to the PIC18F4550 through target board. Each time I run Mplabx v5.15 it shows:
Device Erased…
“”
Programming…
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x97f
configuration memory
program memory
Address: 12 Expected Value: f0 Received Value: e0
Failed to program device
“”
The Expected value and Received value never matches. I don’t know if that is the problem and what causes that. Read more
C programming problem – I am using PIC18F4520, IDE- MPLABX v3.65, compiler- HiTec PICC-18. I have one variable unsigned long AdcValue which contains a reading of the ADC corresponding to temperature. Now, I have another variable float DecTemp which contains temperature in decimal. Calculation is: DecTemp=(AdcValue/10)/1000; i.e. if AdcValue = 316589 then DecTemp will be 031.658 deg C.
DecTemp=(AdcValue/10.0)/1000.0;
But whenever I execute this code my PIC18f4520 gets reset on keypress and I am not able to understand why. Read more
Problem with NTC thermistor and Aref – I have a problem when I read from NTC thermistor, LCD display -273 C on LCD (Proteus) when I connect Aref to ground and program ADC REF to an internal cap. But if I connect it to 5v and program its reference to vcc it works fine. What is the problem? Read more
Leave a Reply