Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help a big project

Status
Not open for further replies.

Lilikin

New Member
Hi i am from University of Plymouth and have designed and in the most part made my final year project there is however some small problems such as my five pics that need programming.

this is what i am doing with each i just hope someone can advise me on what to do HELP!!!

i have about two weeks till i realistically need to start testing and so need a hand

i can programme a little and have the basics but need some major help

ok here are the five pics

Command pic this has some simple functions and controls the rest needs to get input from the tranceiver chip giving a 8 bit code of which half has the direction of travel required the other half has the distance to target on a long, medium and short basis i am using a pic16f877a for this as it has loads of ports for everything it also interfaces with the motor driver pic and the ultra sonic pic the program needs to do two things here get the direction and distance travel there and using the ultra sonic pic as input avoid anything

next is the ultra sonic pic i have drivers for my own device and they work there are 6 sets or rx and tx the idea is they will scan through in an order the sensors are at given degrees at 45 30 and 0 degrees -30 -45 as well as a 180 for reversing 0 degrees is perpendicular to the front of the vehicle this is so i can triangulate etc the idea here is to pulse each tx ten times then start counting they all have there own tx port and a common rx port after they pulse they will count the time taken to return then divide by the speed of sound to calc a distance this outputs to the command pic the pic is the pic16f877a again

the motor control pic is overkill it simply outputs to the motor driver a novel relay instead of the h bridge option as well as placing the possible reverse routine etc i know it is overkill but i did want it to slowly increase speed to the device and not bog down the command pic with all of that i am using a pic16f628a

there is a pic that counts the no of rotations on two wheels it needs to only count when both wheels turn i am using a optocoupler smit and this will output to the tranceiver chip i am using the pic16f628a

the last pic is probably the hardest it is the tranceiver chip i have got several things that going to and from it i have two easy radio tranceivers and i need to send a lot of data through them firstly i have a gps receiver i can get this to send the signal through in binary using rs232 now this pic is the pic16f877a it has a serial port but a different type i can however get a rs232 buffer chip i need to get the gps receiver to be multiplexed with the output from a compass module that uses pwm and the output from the motor counter pic this will go over the easy radio and tell my desktop where it is how far its travelled and the current direction of travel i need all this for averaging purposes

HELP i just need a lot of pointing in the right direction
 
You might have a look at my tutorials?, which will help you on some of your requirements.

I would strongly suggest though that you concentrate on one PIC at a time, probably the one to start with is the motor driver PIC (and PWM motor driver code for the 877/876 is in my tutorials).

Also, I would suggest that five PIC's is considerably more than you really need?.
 
thanks Nigel

sorry about the previous post it was in a moment of weakness i have subsequently have some legitimate code for my motor driver and the counter, i also agree that i have used to many pics but the functionality of the project has decreased and the hardware has remained the same

i have a question about one of your tutorials number seven for the rs232 you use the '8n1' suppose i wanted to have more bits then 8 say i want eleven you say in the coding infomation that 'Bit_Cntr - used to count the number of bits sent or received, set to 8 and decremented' i would use simply input 11 is this correct? also the pic i am using the pic16f877a on the data sheet talks about the serial port (its not on me so cant quote chapter and verse) i take it this is the serial port and will utalise the rs232 protocal

in addition if am connecting this to my pc (via easy radio i have the manufacturers circuit for interfacing rs232)

as i am using c++ will i need to change my code to allow for a change in the number of bits
 
Standard serial is 8 data bits in a byte, if you want to use 11 data bits it's best to send it as two 8 bit data bytes - your easy radio modules will expect it like that!.

It would be simple to convert my software UART to 11 bits, but you couldn't do the hardware UART - and I would suggest it's NOT a good idea anyway!.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top