Shop OBEX P1 Docs P2 Docs Learn Events
Debug light example bug? — Parallax Forums

Debug light example bug?

SimDanSimDan Posts: 3
edited 2008-01-26 01:47 in Propeller 1
Greetings all!

I've had a Hydra sitting on my shelf for a few months now and I am finally getting around to playing around with it.

Anyways, I typed in the debug LED example on page 191 of the Hydra book. When I compile, the Propeller Tool gives an error on the lines with #!DEBUG_LED_PORT_MASK indicating that "Source register/constant cannot exceed $1FF."

I have tried substituting in $FE and $1FE which will compile fine, but the light does not change brightness.

I'm not sure if I have made a typo that I am not seeing or if the book is wrong. I'd attach my type up of the example, but first what are the rules around here about posting such copyrighted material?

Thanks!

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2008-01-26 01:26
    Well, this is one of the very rare examples, where Andr
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-26 01:47
    I just see, this program is more complex than it should... it in fact will only work when the "debug_led-inc" is a power of two, otherwise the ADD debug_led_brightness,.. instruction will rarely produce a zero flag...

    I think it is best you design your own LED dimming program!
    This example was given to show the interaction between COGS, SPN and asembly code only... Nobody seemed to have tested its functionality
Sign In or Register to comment.