Forum Replies Created
-
AuthorPosts
-
Ligo GeorgeKeymaster
I already posted the reason for choosing SD Card. Windows will not work with Raspberry Pi. Operating system is working on Hardware. So hardware must be compatible with Operating System. We can only use OS customized for Raspberry Pi
Ligo GeorgeKeymasterNot even in Raspberry Pi, nowadays Hard Disks are getting replaced with Solid State Drives in latest computers. It has the following advantages.
- More Durable
- Faster Performance
- Less Power Consumption
- Light Weight
- Long Life
- Cost Efficient for Long Run (energy savings, long life, performance)
- Very Low Heat Dissipation
- No noise is produced as there is no moving parts
Ligo GeorgeKeymasterUse sprintf() to convert floating point number to string :
........ #include<stdio.h> ...... ... ... void main() { char s[16]; float f; ........ .... while(1) { .... ... ... sprintf(s, "Float = %f", f); Lcd_Set_Cursor(1, 1); Lcd_Write_String(s); ........... ..... } }
Ligo GeorgeKeymasterYou can display floating point values on LCD in following two methods.
- By converting floating point value to string and display that sting using Lcd_Write_String()
- By separating each digits and display that digit using Lcd_Write_Char() after converting it to character
The second method is the best method but it will vary depending upon the length of values that to be displayed.
Ligo GeorgeKeymasterSorry,
Currently we don’t have any PID projects.Ligo GeorgeKeymasterYes, it is in 24 hour format.
Ligo GeorgeKeymasterIt is not a good practice to use goto statements in your programs.
Try like this to display UART data on LCD :
void main() { Lcd_Init(); Lcd_Cmd(_LCD_CLEAR); Lcd_Cmd(_LCD_CURSOR_OFF); UART1_Init(9600); while(1) { if(UART1_Data_Ready()) { gps = UART1_Read(); Lcd_Chr_Cp(gps); } }
Ligo GeorgeKeymasterOK, fine.
Ligo GeorgeKeymasterHello,
Use this program :void main() { TRISB = 0b000000110; TRISA0 = 0; Lcd_Init(); Lcd_Clear(); Lcd_Set_Cursor(1,1); Lcd_Write_String("WAITING..."); UART_Init(9600); UART_Write_Text("Terminal is running!"); Lcd_Set_Cursor(2,1); while(1) { if(UART_Data_Ready()) { RA0 = 1; Lcd_Write_Char(UART_Read()); __delay_ms(300); } } }
Ligo GeorgeKeymasterHello, It seems like you converted our program in the article Interfacing HC-SR04 with PIC Microcontroller to CCS C.
In that tutorial I used prescaler : 2, so you should use :
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_2);
and you should change a-4 to a in printf().
Please check the above program after making these changes and let me know whether it works or not. If it works, I can include it too in that article such that it will help others too.
Ligo GeorgeKeymasterYou may use heat sink and / or cooling fan.. but the best solution is to reduce input voltage.
If you can’t reduce the input voltage, you can use switched mode buck converters. Following link may help you.
Ligo GeorgeKeymasterI tested the above code in PROTEUS, it seems to be working..
Ligo GeorgeKeymasterTry the following code :
const unsigned short MyChar5x8[] = { 0x04, 0x0E, 0x1F, 0x0E, 0x04, 0x00, 0x00, 0x00, // Code for char num #0 0x1F, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F, // Code for char num #1 0x0E, 0x11, 0x1B, 0x11, 0x15, 0x11, 0x11, 0x0E, // Code for char num #2 0x00, 0x11, 0x1F, 0x11, 0x1B, 0x0E, 0x04, 0x00, // Code for char num #3 0x04, 0x0E, 0x1F, 0x0E, 0x04, 0x04, 0x04, 0x04, // Code for char num #4 0x04, 0x04, 0x04, 0x04, 0x04, 0x1F, 0x0E, 0x04, // Code for char num #5 0x1F, 0x00, 0x04, 0x04, 0x0E, 0x00, 0x00, 0x1F, // Code for char num #6 0x1F, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x1F // Code for char num #7 }; void InitCustomChars() { char i; Lcd_Cmd(0x04); Lcd_Cmd(0x00); for (i = 0; i <= 63 ; i++) Lcd_Write_Char(MyChar5x8[i]); Lcd_Cmd(0); Lcd_Cmd(2); } void main() { .... .... Lcd_Init(); .... ... InitCustomChars(); .... ... do { '''' .... Lcd_Set_Cursor(1,1); Lcd_Write_Char(0); //Displays First Custom Character ... } }
Ligo GeorgeKeymasterYou may multiplex UART using ICs such as 74HC4052 or you can program GPIO pins as UART (Software UART).
November 12, 2014 at 10:49 am in reply to: How to interface more than one servo with PIC 16F887 #9817Ligo GeorgeKeymasterCan you explain the problem in detail ? What happens when you operate 2 servo motors simultaneously ?
It might be the problem of your power supply. Make sure that your power supply can provide enough current to operate 2 servo motors simultaneously.
It is better to use separate power supplies for PIC and Servo Motors OR you should use proper filtering capacitors, otherwise ripples produced by the servo motor will reset the PIC Microcontroller. -
AuthorPosts