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.
PIC18F24K Modbus function code 1 – I am trying to interface PIC18F24k40 over Modbus RTU. I am posting part of my code. The below code work with function 03 holding register. Now I am trying same code to modified for function code 1 i. read coil register. I am getting improper Modbus response error. can someone suggest what change to be done make it work. Read more
PIC serial programming issue – I’ve built many PIC16F84A serial programmers with and without an external power supply but none of them succeed and I don’t know why. I’ve used so many programmers like PICPgm Programmer, WinPic800 and icprog. At the end of the programming process, I get a verification error message except for PICPgm, I get a message “PIC not detected”. Read more
Strange behaviour from microcontroller pin – We are using the PIC16F18856 in 4x4mm UQFN package. Port RA5 works when we program it as digital input…..reads it fine whether input is high or low. Port RA5 also works when we program it as digital output….gives a square wave output fine. However, when we program the pin as an analog (ADC) input..it reads it but the 9th bit (dec 256) of the ADRES register is strangely always set high)….so for example even when we have a grounded input to the pin as an ADC, it reads 0x0100 instead of zero. Read more
Arduino based blood pressure monitor – I need some help to design an Arduino base blood pressure monitor. Please suggest a pressure sensor which can give utmost accuracy, other than Honeywell 015PDAA5. Please feel free to share the code for completed blood pressure monitor. Read more
LED doesn’t turn off – I have a problem with my code. (please click to see full code string)
LED0 = 0; // I add these LED0 And LED1, mean are Q1 && Q2 have a voltage LED2 is ON and LED0 and LED1 become off
LED1 = 0; // but it doesn’t work, it only blinking
LED2 = 1; // LED1 is on
When Q1 and Q2 have a voltage, I wish to turn OFF 2 LED, are LED0 and LED1 and Turn ON LED2, but onto my code, both LED (0 and 1) only blinking or On can’t be OFF. Read more
BLDC driver timing is totally wack – Getting back to my running BLDC, I looked at the timing of the hi and low drivers, it is amazing that thing is spinning around the way the signals are out of alignment, so I would like to get the timing in order so that it may run top efficient. This is the hand made timing diagram of the hi and low of the three half bridges.
I notice that the B-hi and B-low are both 1.5ms in duration, whereas A and C are both 1.1ms, so why the h… is that? Is that a misalignment of one hall sensor? Read more
Generating sine wave using interrupt – I want to generate a sine wave and also I want to calculate the power factor of RL series circuit using interrupt. Can anyone give me suggestions? I don’t know how to use the interrupt in Arm LPC2148. Read more
PT100_calibration formula – Here I am attaching the output of ADC along with input given from calibrator for PT100. I am looking for Equation that can provide 0.1-degree accuracy. Can someone suggest me equation based on the input provided? I thought of using slope and intercept equation. Read more
Calculus for internal oscillation with LCD display – For my new project, I need to use a LCD display that has 320×240 pixels among other things. I am currently evaluating the MCU specs needed to run everything, and more importantly, I need to decide what minimal frequency I need to run the LCD in a decent way. I decided to go with this display in 16bits/px parallel mode. My problem is that I’m not confident about my calculus. Read more
Auto reset PIC18f2550 – I am making a circuit to check the capacity of lead batteries and I use an PIC18f2550. To check the capacity of the battery I connect it to a load and measure the current and voltage. When I use the circuit in the first mode (with an external 5v power supply), it works. When I use the circuit in second mode (directly from the battery to check) the PIC pic is reset when the load to discharge the battery is connected. Read more