-
Search Results
-
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.
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.
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'; } }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
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??
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!
