Search Results - microcontroller

Home Forums Search Search Results for 'microcontroller'

Viewing 15 results - 46 through 60 (of 127 total)
  • Author
    Search Results
  • #12352
    Ligo George
    Keymaster

    Hi,
    Sorry for the delay in reply. We were about to publish an article regarding this. So now, try the following link.

    #12304
    Ligo George
    Keymaster
    KenArton
    Participant

    Hello,

    I am using a PIC16F1829 to drive a Winstar OLED display type WEH001601A, which is a
    16×1 character display.  Using the LCD Functions on the electroSome website, I have
    got this working very nicely.  (Although OLED, they are driven in the same way as LCD.)

    I now want to try using a Winstar WEG010016 display; this is a graphics display with
    100×16 pixels.  It’s datasheet seems to be very similar to WEH001601A, but information
    on using it in graphics mode is limited and confusing.  I wonder if you have any help
    on this topic at electroSome?  Some example code would get me started on the right path.
    I have tried hacking around with commands and data, but with no success. Pixels light up
    OK, but the display is garbage.

    Many thanks for any advice you can offer,    Ken.

    #12288
    Ligo George
    Keymaster

    You can use HC-05 or HC-06 bluetooth module for that. Just pair that bluetooth module with your android device first. You can connect the RX of bluetooth module to the TX of microcontroller and vice versa. Then if you send any data from android you can easily read from the serial port of microcontroller and vice versa.

    #12285
    Priyanka Bisht
    Participant

    ohh thanks!
    but if we do the same using android and bluetooth device then how to program the microcontroller for the o/p from bluetooth device?

    #12264
    Ligo George
    Keymaster

    You can directly connect the output of HM2007 module to input pins of pic microcontroller. Don’t forget to configure those pins as input by writing to TRIS register. It will be easy to program if you use same port for all those input pins. Then you can easily change the output of L293D for each inputs as per your requirements.

    Priyanka Bisht
    Participant

    Please help me to interface L293D and HM2007 voice recognition module with PIC 16F877A microcontroller. The motor should change its direction for each output of HM2007.

    #12123
    Ligo George
    Keymaster

    You can do the program by combining details in these two tutorials : Interfacing DC Motor with PIC Microcontroller and DC Motor Speed Control using PIC Microcontroller PWM. You need to calibrate the value of duty cycle with RPM, there is no other way.

    emufambirwi
    Participant

    I am doing a project which requires that I turn on and off two LED’s independently from a computer using serial port communication. I send a character like ‘A’ via the serial port and turn on one LED for say 1 minute and send another character like ‘B’ and turn on another LED for 2 minutes. My problem is that when using Timer0 of pic 18F87k22, I can’t implement the 1 minute and 2 minute delays independently. When I turn on the one LED the other one doesn’t respond and vice versa. I am simulating using Proteus and my code is is in MikroC as shown below:

    char uart_rd;
    char cnt;
    
    void interrupt () 
    {
      if (TMR0IF_bit) 
      {
         cnt++;                 // increment counters
         TMR0IF_bit = 0;        // clear TMR0IF
    
         TMR0L = 0xDC;             // set TMR0 for aproximetly 1 sec
         TMR0H = 0x0B;
      }
    }
    
    void one_min_delay () 
    {
      TRISB  = 0;              // PORTB is output
      TMR0H = 0x0B;
      TMR0L = 0xDC;               // Timer0 initial value
    
      T0CON = 0x84;            // Set TMR0 to 8bit mode and prescaler to 256
      GIE_bit = 1;             // Enable global interrupt
      TMR0IE_bit = 1;          // Enable Timer0 interrupt
    
      cnt = 0;                 // Initialize cnt
    
      do 
      {
        if (cnt >= 60) 
        {
          LATB = 0x00;      // turnoff PORTB LEDs
          cnt = 0;             // Reset cnt
        }
      }while(1);
    }
    
    void two_min_delay () 
    {
      TRISB  = 0;              // PORTB is output
      TMR0H = 0x0B;
      TMR0L = 0xDC;               // Timer0 initial value
      T0CON = 0x84;            // Set TMR0 to 8bit mode and prescaler to 256
      GIE_bit = 1;             // Enable global interrupt
      TMR0IE_bit = 1;          // Enable Timer0 interrupt
    
      cnt = 0;                 // Initialize cnt
    
      do 
      {
        if (cnt >= 120) 
        {
          LATB = 0x00;      // turnoff PORTB LEDs
          cnt = 0;             // Reset cnt
        }
      }while(1);
    }
    
    void main() 
    {
      UART1_Init(9600);               // Initialize UART module at 9600 bps
      Delay_ms(100);                  // Wait for UART module to stabilize
      TRISB = 0x00;
    
      while (1) 
      {
        if (UART1_Data_Ready()) 
        {     // If data is received,
          uart_rd = UART1_Read();
        }
    
        if (uart_rd=='A')   
        {
          LATB = 0x01;
          one_min_delay();
        }
        else if (uart_rd == 'B')   
        {
          PORTB = 0x02;
          two_min_delay ();
        }
        uart_rd ='\0';
      }
    }
    
    #12009
    Ligo George
    Keymaster

    Dear George,

    You can’t do it using ADC interrupts. ADC interrupt will always generate when the A/D conversion is completed. But you can do it using Comparator Module of PIC Microcontroller.

    zs1bfe
    Participant

    I have been using I2C between Rpi & PIC16f877 with the PIC running at 3V.

    I would like to use 5V on all circuits and supplies.

    Is it possible to use 5V on the I2C pins of RPI?

    I cannot see that a levelshifter will work, please help.

    Thx

     

    #11922
    Ligo George
    Keymaster

    Hi,

    Your problem seems to be with Power Supply. Hope you are using same power supply for powering DC Motor and PIC Microcontroller. There will be a sudden drop in the supply voltage when the motor is powered, this will reset the microcontroller and program starts from the beginning again and again.

    Try the following,

    1. Use separate 12V and 5V power supplies.
    2. Make sure that every components used in the circuit is able to provide peak current required during motor switching
    3. Increase the capacitance of both 12V and 5V rail. Eg : Put 1000µF for 12V and 100µF for 5V. Add 0.1uF near each ICs.
    George Mathew
    Participant

    Dear Sir,

    I am trying to make a robotic car with two 12V dc motors(30 rpm) and an L293D  and using PIC16F877A.

    My problem is that when motors are disconnected,The voltage levels on on the output of  L293D (already connected its inputs to outputs of PIC) is changing as per the sequence in the Program. But Once the motors are connected, The sequence sometimes change,may not change and may sometime stay constant and voltage levels not changing according to program.

    For eg if  ‘1’ ‘0’ is the condition for motor to rotate in anticlock wise direction.and suppose we change it to ‘0’ and ‘1’,If the motors are not connected,the program is working fine and output is behaving properly else not.

    Actually what is the problem,Is there any solution??

     

    Omotoso Omoniyi
    Participant

    Hi guys, i have followed the tutorials on

    1.  Using UART of PIC Microcontroller – MPLAB XC8 at https://electrosome.com/uart-pic-microcontroller-mplab-xc8/

    2. Using UART on raspberry Python. Link at https://electrosome.com/uart-raspberry-pi-python/

    The project i am working on will have me send pure strings(texts) from raspberry Pi to PIC and vice versa using UART, I have wired the circuit as expected but the message i am getting on the raspberry Pi and on the PIC is sort of garbled. I do not know what is responsible for this, please does anyone have an idea of what i should do to get the messages in the write format. Thanks!

    #11873
    RonnieLord
    Participant

    The code you are using is looking fine and workable? Did you tried it on your hardware? Also what is your whole setup? What are the other components?

    Can you please show all about this here? Also try by using the different port?

    Why you want to interface two microcontrollers? Many readymade boards are available to do this job.

Viewing 15 results - 46 through 60 (of 127 total)
>