Serial communication interrupt flag in PIC18f4520 and mikroC Pro for PIC – I wrote a code to send and receive data serially in an application that will update a 16-segment display. If a string of characters is received, an interrupt will occur for every character received in the string. I thought of taking a variable and increment it every time serial interrupt occurs. However, it’s been increasingly random. I have included the code. Read more
PIC16F1936 variable duty cycle with lookup table and potentiometer – Could anyone help me to create a PWM signal with variable duty cycle using a potentiometer and a lookup table from internal EEPROM? I am able to adjust the duty cyle using a potentiometer on ra0 but still have a problem reading from EEPROM and passing those values to the PWM module/ I am using ASM for better precision. Read more
Resistance value of potentiometer – I am making a 3.7V low battery indicator. The led glows when the battery voltage reaches 3.2v. I am using a 5k pot to adjust the desired range of operation so i have set the range at 3.2v. I am going to use this circuit in one of my products which I need to manufacture in quantity. Instead of adjusting the pot every time in every circuit, can anybody tell me how can I check the resistance value of pot and replace it with some resistors? Read more
Enabling or disabling pin in AT89C51 in C – I have connected an LDR to the pin P2.0. I want to disable all other pins of the controller until P2.0 gets equal to the 5V. Where, 5V=Vcc. How do I do this using C? Read more
LCD 16 x 2 4-bit interfacing problem -I am unable to send 4-bit data to PIC18f2520 PORTC upper nibbles. I don’t have any idea how to send 4-bit data to an 8-bit port. If I work with an LCD library, it works fine. But I have manufactured my PCBs so I am unable to change pins. Read more
Programming in C for 8051 MCU – I wrote a program in assembly for an 8051 microcontroller but now I want to write a program in C. My problem is I want to write addition, multiplication, hex to decimal conversion, etc.. for more than 8 bits. How can I write it? Read more
ADC0808 giving random values – ADC0808 is giving me output 00 for 0v and 255 for 5v which is correct. However, for analog input between 0V and 5v, it’s giving me random values. I’m generating a 100 KHz frequency to the clock pin of the ADC0808. Read more
LCD is blank if the ADC voltage is lower than 5V – I’ve constructed a project for solar lighting using the PIC16F877A. It will simply monitor battery and solar voltage via an ADC and switch on/off load and charge a battery. The ADC was set to 5V but if the battery or solar voltage is low or the ADC goes below 5V like 3V, my LCD goes blank. I am attaching the code and my Proteus file. Read more
Microcontroller having 5 UARTS – I want to use a microcontroller having 5 UARTs and 50 GPIOs. Can anybody suggest which controller should I use? Read more
Micro C PRO programming error – I am using Micro PRO IDE for my program development of an AC voltage control (230vac control – using 0-5v dc proportional signal). When the voltage is above 250 or below 180, an output relay will trip and a corresponding LED (LOW/HIGH) will glow. At the same time, it write the voltage and time to EEPROM consecutive locations and display it on a virtual terminal. Up until now, it was working well, but I intend to implement one more function “Called()” in the program to read EEPROM contents manually by pressing 3 on the keyboard. But when I call these function from the main program, an error signal starts. Even the “called ” function is empty or with some lines of instruction. Read more
Leave a Reply