reset process & ...
![CannibalRobotics](https://forums.parallax.com/uploads/userpics/935/nDKB1D6DBLH3C.jpg)
![scool.gif](http://forums.parallax.com/images/smilies/scool.gif)
Even after that load, I can use the reset button and the same code will return 0's. I know things are running but it seems unpredictable.
Also, I hate to admit it but I'm discovering (the really hard way) I really don't understand 'whose on first'. When a cog is started, does it just load the code segment called in cognew or does it also load the routines "called by" it as well.
If a cog object calls something, does it load in with the cog object or initiate another cog. I've read over the manual and it's just not getting into my head. Any reference recommendations would be appreciated.
Thanks,
Jim-
·
Comments
If you do cognew() with a PASM program, then 496 longs get loaded into the cog, starting with the address specified in the cognew() function.
Hopefully that answers one of your questions. Not sure about your reset question. Perhaps it is an initialization issue? A power down might reset your other chips, but the reset button won't. Perhaps they're not being reset properly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's strange. I am now working very carefully through the code to make sure I don't have any port conflicts on the control lines. All of the A2D's use an active low enable or chip select so I'm thinking it could be a pin conflict since a 0 cant get by a 1 with the wired OR port control. But it seems like that would be consistant, either there is a port conflict or there is not?
Anyway, it's an enigma at the moment. I'll let you know.
Thanks for the input though, glad to know it's not isolated to my little board.
Jim-
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
I went back through my design docs and couldn't find any specific reference to needing pull ups/downs. I do have current limiting resistors between the 5v output devices and the prop. In looking at the code, if it's executing properly there really are not any opportunities for the lines to float. Nothing shows up on the scope.
The accelerometer and compass data lines are bi-directional so I never read them until I've sent something out then switched the port direction. The ADC0838 pretty much just responds to clocks and control lines, it does not have a reset sequence per-se.
I think today the prop has worn me down. I'm going to go swimming.
Have a great weekend everyone.
Jim-
Also, the peripheral datasheets won't mention it, because they expect inputs to be driven at all times. Without pullups/pulldowns, that simply won't be the case during reset.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
Post Edited (Phil Pilgrim (PhiPi)) : 6/27/2008 8:30:56 PM GMT
As it turns out, the compass read part of the data acquisition object was stuck in a loop waiting for the "0011" indicator of good a good conversion.
I have found out that even though one resets and restarts the compass A to D on each pass, the A to D does not always get a complete conversion cycle.
Being used to the National Semiconductor A to D's that just clock out the data and let you decide if it's good or bad, it had not occurred to me that data might never show up. Probably would have seen that had I looked a little more closely at the docs.
Sometimes being away from the problem for a weekend does wonders. YaHoo!