Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me with At89s52 programming for generating PWM signals

Status
Not open for further replies.

divit

Newbie level 6
Joined
Nov 13, 2008
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,367
I need to generate pwn signals at port 0.0-0.7 and port 2.0-2.7.The pwm signals should change their Ton period according to digital value received from the adc by each sensor.every pin will hav a different pwn signal according to correspoding value of the sensor.the sensor will basically be a 5k ohm pot .the pwm signals will run a servo motor.the servo motor should move between 0 to 90 degrees.I am also posting the schematic please help me out i need to do this for my final year project
 

at89s52 project

Hi,
Your project looks interesting with multichannel PWM output. I am attaching here with a pseudo-flow chart and let me have your views about it. There may be many mistakes, which could be corrected in due course.

Regards,
Laktronics

After reviewing your reply, I realise that the solution is not suitable for your application.
Regards,
Laktronics
 

    divit

    Points: 2
    Helpful Answer Positive Rating
programming at89s52

Thanks alot but the thing is i am only good at desiging i hav very little knowledge about c progarmming but i knw how to prgram using hex code. i would be pleased if u could write the program.as soon as the program is done i will be also posting the blueprints and photos of the project thank you for your help

Added after 12 minutes:

And also 1 more thing i need to run servo motors so i cant use signal of 51.2msec.
ill attach a picture showing the time period of running of servo motor and also visit this link


**broken link removed**
 

at89s52 programing

Hi,
As far as I can see there is no way to realise such multichannel wave forms using the circuit shown by you.
Regards,
Laktronics
 

programming the at89s52

Hi,
On a second thought, there is way of doing it as follows:
You first load 00h to ports P0 and P2. Set for a long interrupt period of 18240 usec. During this period read all ADC channels and set up 16 pairs of registers with appropriate bit values.
On receipt of interrupt, change the interrupt to 32usec. For the first 39 interrupts load P0/P2 with 0ffh and for the next 16 interrupts load each pair of 16 register pairs to P0/P2. Go back to Reading ADC process from the beginning and repeat the cycle.

Regards,
Laktronics
 

servo motor with at89s52

I understand what you are saying but i dont know C progarmming and not possible to programe in hex code cause it will be too lenghty to write so i would be greatfull if any 1 ull could write down the code and send it to me.And this project has already been made by some 1. But i will be adding a few more features to the hardware
 

programming for at89s52

Hi,
Nor do I expect you to write in C. You can easily do it in Assembly and that will give you good control over execution time.
This is your project and only you are expected to do it. I would not like to rob you of your birth right to stand on your own feet, and if you do not know, this is the right time to learn. Sitting on this side of the internet pipe all that I can do is to clarify some points, that too if I know it. So, there is no question of my doing your project.

Regards,
Laktronics
 

    divit

    Points: 2
    Helpful Answer Positive Rating
hexadecimal code for at89s52

err can u just giv me a example coding in C so i can get an idea .
 

programming for at89s52

divit said:
err can u just giv me a example coding in C so i can get an idea .

google is your friend.
 

at89s52 en c programing

I searched everywhere for a descent program but everythig failed me thats why i opted for forums

Added after 49 minutes:

I am posting a c code for a project on rc servo motor used to control camera using a adc and some micro controller with a joystick my project kinda has the same build so can u like remove the extra parts and show me wat i will actually need i found this long back
 

programming in at89s52

Still looking for someone to do your homework for you? Try offering the $14 you offered over at the other forums.

Message from Mod: Please avoid going into PERSONAL issues. You have been warned.
Topic locked
.
 

servomotor con at89c52

Err lissen blue i offered it cause some 1 asked me how much would i pay otherwise i am just asking for help if u wana help only then post plz
 

at89s52 programming algorithm

Topic locked for a week untill users cool down. Please avoid personal comments in the future. User "blueroomelectronics" has been warned.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top