Fabio,
I just uploaded for the group a rar called ts7500_pwm.rar. This one contains
the source to generate a ts7500 core without the CAN part, and with a PWM
enabled, at 75 Khz. You can vary it's duty cicle accessing 0x6A register in the
memory.
It uses the 75Mhz clock to generate it, so it counts from 0 to 1000, to
generate 75Khz signal.
The 0 bit in the 0x6A will enable it, while bit 11 to 0, will change duty
cicle. For example, if you want a 50% duty cicle, you would use:
ts7500ctl --address --poke16=0x03E9
if you want to disable it, you can use:
ts7500ctl --address --poke16=0x03E8
I also include the other files I am using for the development I need. They try
to control frequency, duty cicle, and enable in less wishbone memory bytes. But
Im still missing something.
You can actually add easily another pwm by just adding another instance of
generador_pwm in the syscon core, and redirecting the output to pwm[2]. But you
will have to use another memory segment to be able to modify the duty cicle
within Linux.
I override the functions of pin 21 to 36 and 40. I add some pad outputs, and
just didn't use the dio_pads that were already there. You can see the PWM
output at PIN_31 at the TS7500.
Hope this is help on your project, and well, if anyone wish and could improve
the code, it would be great. I just deleted CAN because I needed more space for
the other code. But I just wish I didn't erased anything more else.. at least
my ts7500 is working ok with my needs.
Regards,
Enrique
--- In Ferrug <> wrote:
>
> Humm, I see.
> I'll try here as well, and if I get something I notice.
> thanks again.
>
> Fabio
>
>
> 2010/11/12 David Preza H <>
>
> >
> >
> >
> > That's were Wishbone enters. As far as I know (hope someone with more
> > knowledge could give us some light), TS-7500 FPGA creates a 256*16 bits
> > memory access, which can be used with Linux using the test program ts7500ctl
> > (for example, ts7500ctl --address=0x6A --poke32=0xffff). This will write a
> > 0xffff value in the address 0x6a, which is actually the one FPGA uses to
> > change the output value for pins 36 to 21.
> >
> > This is exactly what I am trying, to override the functionality of pin 36
> > to 30, but I haven't tested enough, and the code is still failing (not the
> > PWM code, but the integration with the wishbone).
> >
> > I have some work to do, but I'll try to test today later, or in the
> > weekend.
> >
> > Regards,
> > Enrique
> >
> >
> >
>
>
>
> --
> "Dê-me uma alavanca e um bom ponto de apoio que moverei o mundo." Archimedes
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|