check this out...
http://s1179.photobucket.com/user/th.../Galaxy%20Dish
check this out...
http://s1179.photobucket.com/user/th.../Galaxy%20Dish
About the WORD limitation, how about DOUBLE WORD?
Use 2 WORD variables, use them in embedded loops.
I know it's more tedious, but it should work in my reality.Code:... (to increment in a loop, has to be rewritten if PULSE COUNT determined in a calculation) IF WORD2 < 65535 THEN WORD2 = WORD2 + 1 ELSE WORD1 = WORD1 + 1 WORD2 = 0 ENDIF ... (to perform pulses) FOR COUNT1 = 0 TO WORD1 FOR COUNT2 = 0 TO 65535 PULSE NEXT COUNT2 NEXT COUNT1 FOR COUNT2 = 0 TO WORD2 PULSE NEXT COUNT2
Robert
Edit: or you can use a 18F with PBPL. D'OH!
Max. 2,147,483,647.
Last edited by Demon; - 3rd June 2014 at 16:20.
BTW, did you catch the ENTIRELY PVC CNC mill/3D printer in the background? There's also extensive pics of that in an album on my photobucket. That was really my very first project diving into electronics... it took me about 3-4 months to get it built and running....
Hi,
OK, next up: The INT-pin is RA2 and it's got both comparator and ADC functionallity multiplexed on it. The comparator seems to be disabled by default (good in this case) but the analog functionallity is NOT disabled. Try adding ANSELA.2 = 0 to turn it off for that pin.Ok, I put a double blink on the Main Menu under the Acquire label since I'm not using it yet. So anytime, I can hit 3 on the main menu and led blinks off twice. No interrupt still. removed intcon
/Henrik.
have a look at this thread for some ideas on serial transmission with interrupts
http://support.melabs.com/threads/28...terrupt-Serial
The BT modules could be the issue have they got Flow Control on the RS232. A data sheet would help.
Steve Earl www.datageo.co.uk
Hi,
If SERIN/SEROUT without flow control works across the BT-link (which it apparently is) then HSEROUT/HSERIN will work too. It's just a matter of getting it setup correctly.
Having an oscilliscope or logic analyzer and probing the signals as it enters/exits the PIC would help. Doing so with the "working" version using SEROUT/SERIN and the with the HSEROUT/HSERIN comparing what you get would most likely reveal the issue.
/Henrik.
I can definitely help you with any design work. I learned A LOT. Doing it in PVC was a real engineering challenge to say the least. My next trick will be a 30'X6' wooden above ground pool. And just to add some challenge to life... no fasteners. Nearly a 1/4 million lbs of water held up with construction adhesive and bailing wire... gonna be fun!
New twist on my lost letters/interrupt problem. It's gotten WAY better since I s***canned the timer, but the ext int is still killing me. Especially if any encoder stops on a high pulse. It tweaks my program to the point it wont even run. I have to disco the pulse wire, jog the dish a lil, then reconnect it to even get going again. Ideas on how to solve this and squash this bug permanently?
Hi,
OK, so now the interrupt IS firing as expected? What fixed it?
I still think you may have a problem with the multiple encoders individual outputs fighting each other when connected togeter. Do you have a datasheet for the encoder you're using and possibly a schematic of how you've got it wired?
What if you disconnect all but a single encoder?
/Henrik.
The ANSEL fixed it....thanks
I only have two encoders running at the moment as there is no skew motor right now. (I had a runaway situation in the beginning and ripped the planetaries out)
This happens with either encoder, so I believe it's probably not the fact their tied together, plus I would think I would see it on the scope. But when I get home tonight I'll try to disconnect one and see if it does it. I think there's something screwey with my power though. OK... I have two 12V batteries on the unit wired in series to 24v. I have 4 large auto-type 5 pole relays in my on-board control box as well as a 7805 to power the encoders. I am grabbing 12v from one batt only. All the motors are 24, but that's how I blew out the planetary. I think they half-powered it so if and when it does crash, it won't do damage. Anyways, I have one hot lead from each relay coming inside to my bench + one encoder lead + two leads (in and back) from a reed switch for azimuth location + one ground lead. so:
UP + (give this 12V+, and since the second relay is 5 pole and NC -, this moves the dish up)
DOWN + (give this 12V+, and since the second relay is 5 pole and NC -, this moves the dish down)
EAST + (give this 12V+, and since the second relay is 5 pole and NC -, this moves the dish east)
WEST + (give this 12V+, and since the second relay is 5 pole and NC -, this moves the dish west)
(This is a standard setup for wiring door locks to a car alarm. It gives you one-wire reverse poles to an actuator or in this case motor)
Those 4 wires are ran to a low-power motor controller. I did have them at 5v relays, but I found the kickback when they shut off was wigging out the chip. The motor controller gives me much better circuit isolation.
Encoder+ 5v pulse from both encoders
Switch feed
switch return (these, I just found and havent wired into my bulkhead plug yet.)
ground (To tie into the breadboard to make common ground to complete the circuit)
I have a 12v supply in the house (14v) into a 7805 to power the motor controller and chips.
If the encoders are in a position to wigg it out, when I disconnect BOTH power leads, the low power side stays powered. WTF? I have to disco the encoder lead or ground from outside to make it stop. What's really strange tho is that I can connect ONLY the 14v + and the board lights up. Without a common ground how can this be? SMFH!! Holy S***! That has to be the longest ground loop in history! I have a UPS charging the batteries which is on an extension cord to my bedroom window. I'm betting if I check, I'll find it's - to ground cont. The power pack I'm using is for the Hughnet modems and I know it's - to ground cont. So it's backfeeding ground from the pack I'm using to power my board, thru my breaker box, out my bedroom window, thru the UPS, to the relay board on the unit, and back in thru the living room. I'm calling Guiness!
I need to fix this tonight before going any further. I think this is the root of some spike-resets I'm still occasionally getting when the dish stops, and god knows what else, including my serial issues. But I guess on the bright side, I know for sure all my ground leads are securely soldered! lol
Bookmarks