"Christopher Tremblay" <[EMAIL PROTECTED]> wrote in
message news:45199@palm-dev-forum...
>
> I'm trying to play sound using the dragonball's PWM and for some
reason, the
> PWMCounter never changes.  This is the code I use to play a frequency.
>
> unsigned short *PWMReg = (unsigned short *)0xFFFFF500;
> unsigned short *Period = (unsigned short *)0xFFFFF502;
> unsigned short *Width = (unsigned short *)0xFFFFF504;
> unsigned short *PWMTimer= (unsigned short *)0xFFFFF506;
>
> *Period = 100;
> *Width = 50;
> *PWMReg = 0x0413;
>
> while ((*PWMReg & 0x08000) == 0); // This
> section never quits because the PWMtimer never increments

On what device are you testing?  These control addresses don't match the
location of the various PWM registers on the Dragonball EZ or VZ.

Buffer empty testing on the VZ or EZ still involves reading from
0xFFFFF500, but the bit to check is 0x0080.

I'd also not expect any of this to work in the emulator.
--
Ben Combee, [EMAIL PROTECTED]
Techwood Broadcasting Foundation, Austin Bureau



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to