Forum Replies Created

Viewing 15 posts - 16 through 30 (of 228 total)
  • Author
    Posts
  • in reply to: PIC18F26K22 Switch and LED Control #13580
    Ligo George
    Keymaster

    It is very easy to do. Simply follow our first two MPLAB XC8 Tutorials, if you want to do it without using any interrupts. The only thing that you need to take care is the LAT register. PIC 18F microcontrollers have LAT register to solve Read Modify Write problems. So for writing data (controlling LED) you need to use LAT register instead of PORT. But for reading data you can use PORT as before.

    Here is the logic.

    1. If switch 1 is pressed toggle the LED 1
    2. If switch 2 is pressed toggle the LED2
    3. If switch 3 is pressed toggle the LED3
    4. If switch 4 is pressed toggle the LED4

     

    in reply to: Creating Menu using 16×2 LCD #13538
    Ligo George
    Keymaster

    Sorry, I don’t understand your question. You can create menu in this display.

    in reply to: RS232 UART 16F877A #13535
    Ligo George
    Keymaster

    It is very easy. You may use RS232 or normal 5V UART. You can choose it depending on the USB to UART converter you are planning to use. If it is having RS232 output, just use MAX232 IC to convert 5V UART to RS232.

    You can use softwares like Putty, Hyperterminal, UART Terminal etc. to view the data in a PC.

    in reply to: Data transmission using Li-Fi #13516
    Ligo George
    Keymaster

    Following are my suggestions.

    1. You can transmit data using similar technology that our IR remotes do.
    2. You can use an IR LED working under high frequency and you can use a TSOP sensor to decode it. For eg. 38KHz and TSOP1738
    3. For two way transmission you may set one device as master and another one as slave. Slave will transmit data only if it get a command from master. This will ensure that only one device will transmit at a time.
    4. You may also use two different frequencies. For eg. 30KHz, TSOP4830 and 56KHz, TSOP4856. In this case two devices can transmit data at the same time.
    in reply to: Error while writing program to PIC 16F877A using PICkit2 #13513
    Ligo George
    Keymaster

    Hi,

    Kindly attach your project files to investigate further. Check the following also.

    1. Make sure that you selected PIC 16F877A in the project settings. PIC 16F877 and 16F877A are different microcontrollers.
    2. You don’t need to check MCLR in the PICkit2 software
    3. You can uncheck Programmer >> Manual Device Select, PICkit2 will automatically detect the microcontroller. So you don’t need to select it manually.
    4. Make sure that the microcontroller you are using is PIC 16F877A not 16F877.
    5. If everything is correct, try using a new microcontroller ic.
    in reply to: MikroC PIC 16F877A Interrupt – Not Enough RAM for Call Stack #13488
    Ligo George
    Keymaster

    It seems like you are trying to do RAM consuming operations (strings etc) in the interrupt routine. Just post your complete MikroC code here.

    in reply to: Interfacing 2 HC-SR04 to PIC Microcontroller #13467
    Ligo George
    Keymaster

    You can do that. Just need to read one by one. See below.

    1. Send trigger to first HC-SR04
    2. Start timer
    3. Listen for echo.
    4. Stop timer once you got the echo
    5. Convert timer value to distance (first distance)
    6. Send trigger to second HC-SR04
    7. Start timer
    8. Listen for echo
    9. Stop timer once you got the echo
    10. Convert timer value to distance (second distance)

    So it is easy. A microcontroller can do above steps very fastly, so it will appear to you that both sensors are reading simultaneously.

    in reply to: Using Capture and Compare mode together – PIC 12F1840 #13464
    Ligo George
    Keymaster

    As I told above, a single CCP will work only in one mode at a time. I think you should do like this.

    • You can use a normal input interrupt or on-change interrupt to detect rise and fall.
    • Start a timer when rise is detected and stop it when fall happens.
    • So you will get the time period from the timer count.
    • Use that CCP module only in PWM mode.
    • Just change the duty cycle based on the timer value.
    in reply to: Using Capture and Compare mode together – PIC 12F1840 #13460
    Ligo George
    Keymaster

    Can you please explain in details ?

    You can use a CCP module in Capture OR Compare OR PWM mode. It will work only in one mode at a time. You may use PIC microcontrollers with multiple CCP modules to use Capture and Compare mode together.

    in reply to: PIC 18F4550 LCD Display Issue #13453
    Ligo George
    Keymaster

    You can use MikroC program, hopefully it will work without any changes. But this MPLAB XC8 requires some changes.

    in reply to: PIC 18F4550 LCD Display Issue #13450
    Ligo George
    Keymaster

    Hi,

    Firstly MPLAB X IDE is a development environment while MPLAB XC8 is a compiler. So you can use MPLAB XC8 compiler with your MPLAB X IDE v3.20.

    Seems like you have some connection problems. LCD backlight will work even if the microcontroller program is wrong.

    Secondly in that project we are using PIC 16F877A, so that hex file won’t work for PIC 18F4550. So you need make necessary changes in the program and rebuild it for 18F4550.

    in reply to: I2C between PIC18F4550 (Master) and Atmega 328P #13434
    Ligo George
    Keymaster

    Hi,

    Kindly post your circuit diagram and all the codes here.

    in reply to: Serial Bits RF Transmission #13429
    Ligo George
    Keymaster

    You may use a small microcontroller for that, a very simple program will work for this.

    in reply to: PWM width controlling on PIC12F1840 according to ADC input #13389
    Ligo George
    Keymaster

    Which part is not working ? Can you please elaborate ? You can refer the following tutorials also.

    We are also providing premium support, you can write to [email protected] for that.

    in reply to: How to generate SPWM using pic microcontroller #13388
    Ligo George
    Keymaster

    Dear Ahmad,

    You should try to do coding yourself and you can ask here if you need any technical support for that. Nobody will have time to develop coding for you.

Viewing 15 posts - 16 through 30 (of 228 total)
>