To run a motor

Discussion of the PSoC Designer integrated development environment for PSoC1 devices.

Moderators: ericb, dcooper, jonp, dpfunston

To run a motor

Postby arivalagan13 » Fri Jan 18, 2013 10:53 pm

i need to run a motor... the psoc should produce digital output to drive the driver......
it should work on following logic.....
psoc output a psoc output b
1 0 fwd direction
0 1 rvse direction
could u pls help me by providing a c program in psoc designer 5.1 based on above logic...
Cheese Wheel
Cheese Wheel
Posts: 129
Joined: Sun Dec 23, 2012 3:32 am

Re: To run a motor

Postby bobmarlowe » Sat Jan 19, 2013 12:52 am

The easiest to access a pin in PSoC1 Designer is to use aLED-component which you may switch on or off as you like. Proper naming of the components (HiSide, LoSide) may help to understand the design.
More difficult will be to avoid the state where both parts of your motor driver are active thus shorting Vcc to Gnd. This may never occur even during the time the device is powered-up, can be solved porobably by using pull-up or pull down resistors. Some integrated H-bridge use enable inputs.

Additionally I would suggest you to upgrade your 5.1-version of Designer to 5.3. The upgrade is free and there are new and corrected components.

Happy coding
User avatar
The Big Cheese
The Big Cheese
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Re: To run a motor

Postby danadak » Sat Jan 19, 2013 4:38 am

You can use the routing fabric in PSOC 1 to create an inverted
signal from a single driven logic output, like a PWM. By converting
this problem to HW you can avoid the problem in an H Bridge of
shorting to ground. Note most modern H Bridge integrated power
driver parts take care of that problem for you. Note this is a subopt-
imal way of doing this because you want a dead period to account
for inherent switching speed differences between low and high side

H_bridge_svg.png (6 KiB) Viewed 3598 times

PSOC 1 Routing Fabric.jpg
PSOC 1 Routing Fabric.jpg (44.84 KiB) Viewed 3599 times

Bobs recomendation pertainent since LED module takes care of shadow
registers, which are needed in the port you are using if it has mixed I/O
in it.

PSOC 1 Routing Fabric.jpg
PSOC 1 Routing Fabric.jpg (44.84 KiB) Viewed 3599 times

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
The Big Cheese
The Big Cheese
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Return to “%s” PSoC Designer (PSoC1 IDE)

Who is online

Users browsing this forum: No registered users and 1 guest