Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

Discussion Groups | Rabbit-Semi | Slow PWM on Rabbit 3000

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

Slow PWM on Rabbit 3000 - thindrake1 - Apr 8 2:04:39 2008

I have an application using a RCM 3400 (Rabbit 3000)

It uses pwm_init, and I am using 3 of the 4 PWM outputs to drive
hydraulic proportional valves.

My problem is that the lowest pwm frequency I can achieve is about 50Hz

The valve needs a slower frequency to work (25Hz) - otherwise it just
operates boolean (OFF below a cetain duty cycle and ON above). Other
valves I have used work great at 100Hz

I think the problem is that the counter runs at a fixed rate, but the
10bit counter can only go so high.

Soo.. I see lots of posts about fast PWM frequency, has anyone tried
to slow down the PWM counter, or count/match above 10bit (chaining?)

I will be trying to get a Timer B interrupt routine together, but not
sure I can get the needed 3 outputs.

Any ideas?

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: Slow PWM on Rabbit 3000 - lwoodzw - Apr 8 17:36:56 2008

If you have a Rabbit 3000A (not the original 3000) and if your PWM
outputs are always on for less than half a cycle, you can limit the
PWM output to pulsing every other cycle and just double your pulse
widths =96 check the 3000A manual for details. If your pulse widths are
always less than 25%, you can output every fourth cycle, and the
option also exists to suppress the output to 1 out of 8 cycles. This
feature was actually added to support servo motors, but it may work in
your case as well.

-Lynn
--- In r...@yahoogroups.com, "mehiegl" wrote:
>
> The limit on the low end of the PWM frequency is 56.25 Hz for the=20
> RCM3400. As Shawn pointed out, if you can live with a slower system=20
> clock, you could disable the doubler and run at 14.7 MHz which would=20
> also cut the lowest PWM frequency to 28.125 Hz.
>=20
> A software PWM using one of the timers is your only other choice that=20
> I can think of. If you have three outputs that require independent=20
> pulse widths, you could:
>=20
> Set up the Timer ISR to fire at the PWM resolution you need.
> Set the outputs high.
> Track the time of the outputs with a counter,
> Compare the counter to Match variables for each output.
> Start over when the ISR iterations add up to the frequency.
>=20
> The ISR would have to fire about every 400 us, if you want 100 steps=20
> at 25Hz frequency.
>=20
> It shouldn't be that hard if you have Timer B available.
>=20
> Mark
>=20
> --- In r...@yahoogroups.com, "thindrake1" wrote:
> >
> > I have an application using a RCM 3400 (Rabbit 3000)
> >=20
> > It uses pwm_init, and I am using 3 of the 4 PWM outputs to drive
> > hydraulic proportional valves.
> >=20
> > My problem is that the lowest pwm frequency I can achieve is about=20
> 50Hz
> >=20
> > The valve needs a slower frequency to work (25Hz) - otherwise it=20
> just
> > operates boolean (OFF below a cetain duty cycle and ON above). Other
> > valves I have used work great at 100Hz
> >=20
> > I think the problem is that the counter runs at a fixed rate, but=20
> the
> > 10bit counter can only go so high.
> >=20
> > Soo.. I see lots of posts about fast PWM frequency, has anyone tried
> > to slow down the PWM counter, or count/match above 10bit (chaining?)
> >=20
> > I will be trying to get a Timer B interrupt routine together, but=20
> not
> > sure I can get the needed 3 outputs.
> >=20
> > Any ideas?
>
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Slow PWM on Rabbit 3000 - Shawn Upton - Apr 8 20:26:47 2008

I thought TimerB could be cascaded off of one of the TimerA clocks? There is probably something there. Also, another option would be to use a slower system clock--instead of using the clock doubler, leave it at 11MHz.

Shawn Upton, KB1CKT

----- Original Message ----
From: thindrake1
To: r...@yahoogroups.com
Sent: Monday, April 7, 2008 6:04:44 PM
Subject: [rabbit-semi] Slow PWM on Rabbit 3000

I have an application using a RCM 3400 (Rabbit 3000)

It uses pwm_init, and I am using 3 of the 4 PWM outputs to drive
hydraulic proportional valves.

My problem is that the lowest pwm frequency I can achieve is about 50Hz

The valve needs a slower frequency to work (25Hz) - otherwise it just
operates boolean (OFF below a cetain duty cycle and ON above). Other
valves I have used work great at 100Hz

I think the problem is that the counter runs at a fixed rate, but the
10bit counter can only go so high.

Soo.. I see lots of posts about fast PWM frequency, has anyone tried
to slow down the PWM counter, or count/match above 10bit (chaining?)

I will be trying to get a Timer B interrupt routine together, but not
sure I can get the needed 3 outputs.

Any ideas?







____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Slow PWM on Rabbit 3000 - mehiegl - Apr 8 21:00:16 2008

The limit on the low end of the PWM frequency is 56.25 Hz for the
RCM3400. As Shawn pointed out, if you can live with a slower system
clock, you could disable the doubler and run at 14.7 MHz which would
also cut the lowest PWM frequency to 28.125 Hz.

A software PWM using one of the timers is your only other choice that
I can think of. If you have three outputs that require independent
pulse widths, you could:

Set up the Timer ISR to fire at the PWM resolution you need.
Set the outputs high.
Track the time of the outputs with a counter,
Compare the counter to Match variables for each output.
Start over when the ISR iterations add up to the frequency.

The ISR would have to fire about every 400 us, if you want 100 steps
at 25Hz frequency.

It shouldn't be that hard if you have Timer B available.

Mark

--- In r...@yahoogroups.com, "thindrake1" wrote:
>
> I have an application using a RCM 3400 (Rabbit 3000)
>
> It uses pwm_init, and I am using 3 of the 4 PWM outputs to drive
> hydraulic proportional valves.
>
> My problem is that the lowest pwm frequency I can achieve is about
50Hz
>
> The valve needs a slower frequency to work (25Hz) - otherwise it
just
> operates boolean (OFF below a cetain duty cycle and ON above). Other
> valves I have used work great at 100Hz
>
> I think the problem is that the counter runs at a fixed rate, but
the
> 10bit counter can only go so high.
>
> Soo.. I see lots of posts about fast PWM frequency, has anyone tried
> to slow down the PWM counter, or count/match above 10bit (chaining?)
>
> I will be trying to get a Timer B interrupt routine together, but
not
> sure I can get the needed 3 outputs.
>
> Any ideas?
>

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

problem setting up FTP client - IAN LEWIS - Apr 9 19:04:41 2008

hello everyone i have been trying to set up a FTP client on a rabbit 3000 board using a enforma modem. I have been unsuccessful thus far. I am setting up the client using the tcpip ftp client sample. i want the sample to connect the rabbit to my moblie service providers network and then use the network to access the FTP server and initiate data transfer. i have tried to set the tcp configuration library to the required setting of the mobile network as shown below

#define _PRIMARY_STATIC_IP "172.020.006.012"
#define _PRIMARY_NETMASK "255.255.255.0"
#ifndef MY_NAMESERVER
#define MY_NAMESERVER "172.20.6.12"
#endif
#ifndef MY_GATEWAY
#define MY_GATEWAY "172.20.6.12"
#endif

when i called my mobile service provider they gave me the following settings and i used them above and i am not sure if i used them correctly
APN web.digiceltt.com
username web
password web
IP - 172.020.006.012
SMS +18683999008

so can anyone tell me if i have used the setting correctly and if there anything else i need, to get the client to connect to the server
P.S. i have set the ip of the server in the main program shown below. (i am using an anonymous account on the server)

#define REMOTE_HOST "190.58.0.146"

/* Port on the FTP server to connect to. 0 == default FTP port */
#define REMOTE_PORT 0

/* username on the server */

#define REMOTE_USERNAME ""
/* password on the server */

#define REMOTE_PASSWORD ""
Thanks in advance for any help it will be greatly appreciated
Ian

_________________________________________________________________
Going green? See the top 12 foods to eat organic.
http://green.msn.com/galleries/photos/photos.aspx?gid=164&ocid=T003MSN51N1653A


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

DC 10.xx compile to .bin file - Scott Henion - Apr 10 14:11:10 2008

Been fighting DC 10.x for months with the DLM's. The .bin files just
would not run. Wasted weeks staring at bios files and playing with
memory maps to get them to boot.

Used the RFU and the .bin does not run either.

Updated to 10.21 from 10.11 and it now runs but the program is running
from the slow RAM instead of the fast RAM.

Finally enabled a program listing:

[STDBIOS.C(1634:1)]: .framswitch::
fffe:e06b 3E08 ld a, 0x08 4
fffe:e06d DD210400 ld ix, 0x0004 8
fffe:e071 210100 ld hl, 0x0001 6
fffe:e074 DD64 ldp (ix), hl 12
fffe:e076 3E80 ld a, 0x80 4
fffe:e078 D3321700 ioi ld (0x0017), a 11
fffe:e07c 3E45 ld a, 0x45 4
****** 0x45 is /CS1
fffe:e07e D3321600 ioi ld (0x0016), a 11
fffe:e082 3E45 ld a, 0x45 4
fffe:e084 D3321500 ioi ld (0x0015), a 11
fffe:e088 3E45 ld a, 0x45 4
fffe:e08a D3321400 ioi ld (0x0014), a

The bios is using the SLOW RAM on /CS1 instead of the fast RAM on /CS2.

If you compile to directly target, it uses the /CS2 as it is supposed to.

I tried forcing _BOARD_TYPE_ in the defines with the same results.

As I test, I used DC9.25 and compiled a .bin for an RCM3200, it ran
perfect on the 4200 (has same mem map and ethernet).

I finally enabled "Compile to .bin file using attached target". The
resulting code now runs correctly with the DLM's

Ever since 9.4x, DC has this "determine board type" even when using
compile using defined target. Looks like this is screwing up code
generation.

Anyway, finally have RDLM working on the RCM4200. Will need to update
documentation, but should have a release is a day or so.

Jeez, I wasted MONTHS on this. ;)

--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------
Rabbit libs: http://www.shdesigns.org/rabbit/
today's fortune
If you can't say anything good about someone, sit right here by me.
-- Alice Roosevelt Longworth
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

RE: DC 10.xx compile to .bin file - John McCord - Apr 10 15:36:45 2008

Good to hear Scott!
My RDLM-based project is running up against memory limitations on the Rabbit
3200. Everytime I add a new feature, I have to search around for stuff I
can live without to make room for a few extra lines of code. This will open
up an upgrade option for me.
Thanks for the effort!
John McCord
Transformational Security, LLC
Elkridge, MD

_____

From: r...@yahoogroups.com [mailto:r...@yahoogroups.com] On
Behalf Of Scott Henion
Sent: Thursday, April 10, 2008 2:09 PM
To: r...@yahoogroups.com
Subject: [rabbit-semi] DC 10.xx compile to .bin file

Been fighting DC 10.x for months with the DLM's. The .bin files just
would not run. Wasted weeks staring at bios files and playing with
memory maps to get them to boot.

Used the RFU and the .bin does not run either.

Updated to 10.21 from 10.11 and it now runs but the program is running
from the slow RAM instead of the fast RAM.

Finally enabled a program listing:

[STDBIOS.C(1634:1)]: .framswitch::
fffe:e06b 3E08 ld a, 0x08 4
fffe:e06d DD210400 ld ix, 0x0004 8
fffe:e071 210100 ld hl, 0x0001 6
fffe:e074 DD64 ldp (ix), hl 12
fffe:e076 3E80 ld a, 0x80 4
fffe:e078 D3321700 ioi ld (0x0017), a 11
fffe:e07c 3E45 ld a, 0x45 4
****** 0x45 is /CS1
fffe:e07e D3321600 ioi ld (0x0016), a 11
fffe:e082 3E45 ld a, 0x45 4
fffe:e084 D3321500 ioi ld (0x0015), a 11
fffe:e088 3E45 ld a, 0x45 4
fffe:e08a D3321400 ioi ld (0x0014), a

The bios is using the SLOW RAM on /CS1 instead of the fast RAM on /CS2.

If you compile to directly target, it uses the /CS2 as it is supposed to.

I tried forcing _BOARD_TYPE_ in the defines with the same results.

As I test, I used DC9.25 and compiled a .bin for an RCM3200, it ran
perfect on the 4200 (has same mem map and ethernet).

I finally enabled "Compile to .bin file using attached target". The
resulting code now runs correctly with the DLM's

Ever since 9.4x, DC has this "determine board type" even when using
compile using defined target. Looks like this is screwing up code
generation.

Anyway, finally have RDLM working on the RCM4200. Will need to update
documentation, but should have a release is a day or so.

Jeez, I wasted MONTHS on this. ;)

--
------------------------------------------
| Scott G. Henion| shenion@shdesigns. org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesign s.org |
------------------------------------------
Rabbit libs: http://www.shdesign
s.org/rabbit/
today's fortune
If you can't say anything good about someone, sit right here by me.
-- Alice Roosevelt Longworth



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: DC 10.xx compile to .bin file - Scott Henion - Apr 10 22:00:14 2008

John McCord wrote:
> Good to hear Scott!
> My RDLM-based project is running up against memory limitations on the
> Rabbit 3200. Everytime I add a new feature, I have to search around
> for stuff I can live without to make room for a few extra lines of
> code. This will open up an upgrade option for me.
> Thanks for the effort!
> John McCord
> Transformational Security, LLC
> Elkridge, MD

Hate to burst your bubble, but the 4200 has no more code space than the
RCM3200.
w...@ecs.csus.edu wrote:
> Scott --
>
> That must be some pretty important customer requesting your RDLM.
> I get the impression you feel DC 10 is demon spawn. :)
>

No specific customer, just calls and emails nearly every day from ZW
sales, support and distributors on when the 4k modules will be supported.

> If you're not sure of if a #define is actually defined, you can
> use #error directive. Not sure what will happen with BIOS code,
> though............. ( but I would first close all other applications )
>

It looks like the RTI file embedded in the compiler is hosed. After
getting it to work I should have looked at the .map file. That usually
lists the #defines.
> ZWorld sells RabbitOS. Have you heard of anyone actually using it?
> I've not seen any support questions here or on the ZW BBS.
>

Yes, people use it. When it does not work, they call ZW tech support.
Support throws up their hands and sends them to me. Their solution is my
best selling tool ;)
--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------
Rabbit libs: http://www.shdesigns.org/rabbit/
today's fortune
tomorrow there will be a great disturbance in the workforce
-- May 18, 1999


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: DC 10.xx compile to .bin file - promolinux - Apr 15 16:56:10 2008

--- In r...@yahoogroups.com, Scott Henion wrote:
> Anyway, finally have RDLM working on the RCM4200. Will need to update
> documentation, but should have a release is a day or so.
>
> Jeez, I wasted MONTHS on this. ;)

Im happy you are using cores with 4000 theres, you expertise is great
for all the comunnity.

Im migrating a project from RCM3000 to a 4000 core. I just use 4
serial ports, interfacing to 74LS138 chips and 74LS125 chips. Is
basically prtocol adapter. Is using costate. The code compiles, but i
need a prototype to know how will it works...

The migrating include redesign of the mainboard. I really expect that
change worths the effort, giving more velocity changing between
costate tasks (i change while sending data to one port, change to the
other, etc)

I buy RCM4400W kit, to test wi-fi options.

What do you think?

Best regards.

Donald.
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )