CTRA mode 01010 not working
Red_Dog
Posts: 7
I'm trying write ASM code to scale an input signal by 1000 but something isn't working. To test it I have one Cog running CTRA as an NCO with the APIN set to output on pin 5 using a demo board. That part works. I have a second Cog running CTRA in POS mode (01010) accepting an input on pin 2. I have FRQA loaded with a value of #1 so that it increments PHSA by one each time it detects a positive on pin 2. I compare PHSA to 1000 and if equal, toggle pin 22 and reset PHSA to 0. I have pin 5 connected to pin 2 and expect to see pin 22 blinking at 1/1000th of pin 5, however it doesn't blink at all. I downloaded a trial version of Viewport and I see activity on pins 5 and 2 but I don't see any activity on pin 22. My hunch is that PHSA isn't incrementing by 1 when the signal on pin 2 goes positive and so PHSA is never equals 1000. I've tried testing it manually using PASD and a switch but I need a debounce circuit as PHSA increments by a random amount each time I release the switch. I've tested it by setting PHSA to 1000 with no input connected and it toggles like it's supposed to but doesn't scale. So my questions are:
1. Is there a way to monitor PHSA on a running cog? If Viewport does this I haven't found it and PASD only works on one Cog.
2. Is there any circuitry that needs to go between pins 5 and 2 to get it to work? I've tried a resistor but no go.
3. Is there anything I'm missing?
I appreciate any enlightenment you can provide.
Red Dog
1. Is there a way to monitor PHSA on a running cog? If Viewport does this I haven't found it and PASD only works on one Cog.
2. Is there any circuitry that needs to go between pins 5 and 2 to get it to work? I've tried a resistor but no go.
3. Is there anything I'm missing?
I appreciate any enlightenment you can provide.
Red Dog
Comments
Thanks so much for your help
Red_Dog