| View previous topic :: View next topic |
| Author |
Message |
BrunoG Site Admin
Joined: 22 Nov 2005 Posts: 636
|
Posted: Sat May 19, 2007 10:36 pm Post subject: |
|
|
Welcome to the forum, and don't be afraid : I'm french too and my english is not that good too
1/ LCD
like this for example :
| mikroC Help Manual wrote: |  |
change LCDPORT and LCDTRIS definitions in the program according to your hardware
2/ PIC & CRYSTAL
see schematic above
use 15 to 33 pf caps for crystal oscillator
add a 0.1µf decoupling capacitor between Vcc and Gnd as close as possible to the PIC
don't forget to tie /MCLR to +5V through a 10 K resistor !
3/ PROGRAMMER
there is a lot of parallel, serial and even USB PIC programmer circuit schematics on the web.
I have no circuit neither to give nor to recommend, because I use development boards with built-in programmers
just avoid any design which does not have its own 13.8V supply, they are generally troublesome.
good luck ! _________________ BrunoG, Administrator |
|
| Back to top |
|
Mycrimsoft
Joined: 19 May 2007 Posts: 3
|
Posted: Sat May 19, 2007 11:21 pm Post subject: |
|
|
Thanks you for these clue, really hapy to discovered this project, that's nice.
Good luck with your website.
But I've some question I see you alwas display on the LCD sreen :
ultrasonic sonar ranger, then the distance and then if OverRange or UnderRnge, I want to translate in french i think it situate from line 136 to lne 142,
L136: Lcd_Out(2, 8, "OverRange") ;
L142: Lcd_Out(2, 8, "UnderRnge") ;
I think I can manage by:
L136: Lcd_Out(2, 8, "Hors-Calibre: supérieur") ;
L142: Lcd_Out(2, 8, "Hors-Calibre: inférieur") ;
Then I always display on the LCD sreen :
ultrasonic sonar, to translate in french I thinks it's situated on line:
L91: Lcd_Out(1, 1, "UltraSonicRanger") ;
Can I managed by :
L91: Lcd_Out(1, 1, "Radar de recul ultrasonique") ;
?
Next question: What mean in french: circular buffer
I want to know if biffer mean: registre or mémoire?
Then I download MicroC démo but I dont know Where my builded .hex file gone? well have you some documentation on it? |
|
| Back to top |
|
Mycrimsoft
Joined: 19 May 2007 Posts: 3
|
Posted: Mon May 21, 2007 5:31 pm Post subject: |
|
|
Sorry for the question, but I've a, query for you.
Can you compile an .hex file for me with french translate of the lcd output?
The line are:
L91 Lcd_Out(1, 1, "UltraSonicRanger") ;
By
L91 Lcd_Out(1, 1, "RadarStationemen") ;
Then:
L138 Lcd_Out(2, 8, "OverRange") ;
By:
L138 Lcd_Out(2, 8, "D>calibre") ;
And:
L142: Lcd_Out(2, 8, "UnderRnge") ;
By
L142: Lcd_Out(2, 8, "D<calibre") ;
Thanks. |
|
| Back to top |
|
BrunoG Site Admin
Joined: 22 Nov 2005 Posts: 636
|
Posted: Tue May 22, 2007 4:16 pm Post subject: |
|
|
| Mycrimsoft wrote: | Thanks you for these clue, really hapy to discovered this project, that's nice.
Good luck with your website.
But I've some question I see you alwas display on the LCD sreen :
ultrasonic sonar ranger, then the distance and then if OverRange or UnderRnge, I want to translate in french i think it situate from line 136 to lne 142,
L136: Lcd_Out(2, 8, "OverRange") ;
L142: Lcd_Out(2, 8, "UnderRnge") ;
I think I can manage by:
L136: Lcd_Out(2, 8, "Hors-Calibre: supérieur") ;
L142: Lcd_Out(2, 8, "Hors-Calibre: inférieur") ;
Then I always display on the LCD sreen :
ultrasonic sonar, to translate in french I thinks it's situated on line:
L91: Lcd_Out(1, 1, "UltraSonicRanger") ;
Can I managed by :
L91: Lcd_Out(1, 1, "Radar de recul ultrasonique") ;
?
Next question: What mean in french: circular buffer
I want to know if biffer mean: registre or mémoire?
Then I download MicroC démo but I dont know Where my builded .hex file gone? well have you some documentation on it? |
Hi,
don't forget that most of common LCD have only 16 characters per line, you will need extra-wide displays to print your messages ! but their meaning is correct.
I would like to be more specific about the ultra sonic ranger project : due to its very simple hardware and software design, this example may not be fitted to real life, in a car for example, where all kinds of unwanted noises and vibrations may disturb its correct operation.
to french readers :
circular buffer : buffer circulaire, c'est à dire espace de stockage dans lequel les données sont placées séquentiellement, avec un retour à zéro en cas de débordement. il s'agit dans notre cas d'un tableau en mémoire.
Launch mikroC, then press F1 to get help, the HEX file is located in the project folder. Just check the message panel to see if the build was successful ! _________________ BrunoG, Administrator |
|
| Back to top |
|
BrunoG Site Admin
Joined: 22 Nov 2005 Posts: 636
|
Posted: Tue May 22, 2007 4:25 pm Post subject: |
|
|
| Mycrimsoft wrote: | Sorry for the question, but I've a, query for you.
Can you compile an .hex file for me with french translate of the lcd output?
The line are:
L91 Lcd_Out(1, 1, "UltraSonicRanger") ;
By
L91 Lcd_Out(1, 1, "RadarStationemen") ;
Then:
L138 Lcd_Out(2, 8, "OverRange") ;
By:
L138 Lcd_Out(2, 8, "D>calibre") ;
And:
L142: Lcd_Out(2, 8, "UnderRnge") ;
By
L142: Lcd_Out(2, 8, "D<calibre") ;
Thanks. |
I'm sorry but I can't, I do my best to help users on topics that do have an interest for all users, but in this case your request is too specific, I hope you understand.
I suggest you to try once more with mikroC, I don't remember if this project fits within the compiler demo limit or not, but if you have a "demo limit" error you can try to remove or adjust code (in demo version, output is limited to 2K of program words). _________________ BrunoG, Administrator |
|
| Back to top |
|
BrunoG Site Admin
Joined: 22 Nov 2005 Posts: 636
|
Posted: Wed May 23, 2007 6:26 pm Post subject: |
|
|
Sorry, I had to delete your post and to post it again, because your message came at the same time as a server down
I'm sorry once more, but I can't be your remote eyes & hands, I suggest you to try to run your program with a simulator like this one :
http://www.oshonsoft.com/pic.html
you will learn from it much more than pictures I could take  _________________ BrunoG, Administrator |
|
| Back to top |
|
vincentspm
Joined: 09 Jun 2007 Posts: 12 Location: malaysia
|
Posted: Sat Jun 09, 2007 9:19 am Post subject: |
|
|
hi all, i going to do this project with some improvement of function, can i have a help?
in your website, just mention the T/R part circuit then how about in PIC16F877A part? what should i do at that part, can i have some procedure or step to to it and compile the program and how to store into the PIC16F877A?
i need new function is, additional tunning angle pointing to the height of the object and send the angle(in degree) inside the microcontroler and do the tangential calculation so that i can get the output of the height of the object. (Exp: for 60 degree, tan 60 = height / distance)
can profetional people give me a help?
thanks |
|
| Back to top |
|
vincentspm
Joined: 09 Jun 2007 Posts: 12 Location: malaysia
|
Posted: Tue Jun 12, 2007 7:59 pm Post subject: |
|
|
no one can help me?
i attach the pic that i need this function to measure angle, anyone know how to do the circuit inside the pic ?
help me pls....
Image Hosting[/img] |
|
| Back to top |
|
BrunoG Site Admin
Joined: 22 Nov 2005 Posts: 636
|
Posted: Tue Jun 12, 2007 11:53 pm Post subject: |
|
|
Hi,
| vincentspm wrote: | | in your website, just mention the T/R part circuit then how about in PIC16F877A part? |
the circuit schematic above could be a good start
| vincentspm wrote: | | what should i do at that part, can i have some procedure or step to to it and compile the program and how to store into the PIC16F877A? |
to store the program into the PIC flash memory, you need a PIC programmer : you can build one yourself from Microchip application notes, or use a commercial one.
| vincentspm wrote: | i need new function is, additional tunning angle pointing to the height of the object and send the angle(in degree) inside the microcontroler and do the tangential calculation so that i can get the output of the height of the object. (Exp: for 60 degree, tan 60 = height / distance)
can profetional people give me a help?
thanks |
if you don't want to use the floating point variables needed by the ansi math library and tan() function, you can use the mikroE fixed-length sin3e() and cos3e() int library functions with :
tan(x) = sin(x) / cos(x)
don't forget that ultrasonic range finders need a perpendicular surface to the direction of the waves to catch the direct echo. _________________ BrunoG, Administrator |
|
| Back to top |
|
vincentspm
Joined: 09 Jun 2007 Posts: 12 Location: malaysia
|
Posted: Wed Jun 13, 2007 5:02 am Post subject: |
|
|
thank you for your help!!
and do u know about angle meter circuit? |
|
| Back to top |
|
BrunoG Site Admin
Joined: 22 Nov 2005 Posts: 636
|
Posted: Wed Jun 13, 2007 8:54 am Post subject: |
|
|
the most simple angle meter would be a 4K7 potentiometer with center on the hinge, connected to an ADC input of the PIC.
a lookup table and a simple linearisation would give directly the tangent of the angle. _________________ BrunoG, Administrator |
|
| Back to top |
|
vincentspm
Joined: 09 Jun 2007 Posts: 12 Location: malaysia
|
Posted: Wed Jun 13, 2007 3:39 pm Post subject: |
|
|
sorry to disturb u again, if i connect the 4k7 potentiometer to RA0, then my code can use or not?
and need to add anything only can get the 0-90degree angle then only do the calculation?
and how to connect the 4k7 potentiometer to the pic?
if i use the 1st line of LCD display the distance and use 2nd line display height can?
my code:
unsigned integer angle;
unsigned long result;
unsigned long Height;
void main()
{
ADCON0 = 0;
angle = Adc_Read(0);
result = (sinE3(angle)/1000)/(cosE3(angle)/1000);
Height = result*cm;
Lcd_Out(2, 1, "Height=") ;
ByteToStr(Height, str) ; // convert to string
Lcd_Out(2,8, str) ; // print string |
|
| Back to top |
|
BrunoG Site Admin
Joined: 22 Nov 2005 Posts: 636
|
Posted: Wed Jun 13, 2007 10:19 pm Post subject: |
|
|
yes you will have to convert the voltage into an angle, maybe a calibration procedure will be needed. use a linear potentiometer to get a linear scale, connect it to Gnd and +V with cursor point connected to the PIC analog input you use.
do not divide intermediate results by 1000 : you will loose accuracy. _________________ BrunoG, Administrator |
|
| Back to top |
|
vincentspm
Joined: 09 Jun 2007 Posts: 12 Location: malaysia
|
Posted: Sat Jun 23, 2007 6:14 am Post subject: |
|
|
| for the potentiometer, if the variation of volt is from 0-5v, when it send into the ADC port of the pic, what the pic detect?in digital form?how to calculate from volt to digital? |
|
| Back to top |
|
vincentspm
Joined: 09 Jun 2007 Posts: 12 Location: malaysia
|
Posted: Fri Jul 13, 2007 9:02 am Post subject: |
|
|
need helps...i just construct whole circuit and try the burning program but using other software load and burn in pic16f877a, is it problem with using other software??
i copy whole LCD code from microC_manual and change LCDPORT to PORTB then connect same as the circuit in the manual but y cannot work at all?just 1st line LCD screen shows all square box only...
so is that any problem or wrong i do?? |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|