Is there a serial driver that dosn't take up a cog?
Matthew H
Posts: 23
I've been trying to free up some of my cogs to make room for advancement's I'm planing on one of my projects and I've started wondering if there is a way I can send serial data back to my PC for debugging without taking up a cog by using Simple or FullDuplex Serial.
Sorry if this sounds vague and you need some more details to help me, but it just seams like a simple question.
-Matthew
Sorry if this sounds vague and you need some more details to help me, but it just seams like a simple question.
-Matthew
Comments
1. Simple_serial doesn't use a cog
2. the is a 4 port serial object so if you use a serial prot elsewhere you can change it to use the 4 port versiona and use the same cog for debug.
Thanks for the help guys,
-Matthew
best regards
Stefan
RC_Car v3-1 Main.spin (Assesses all data and attempts to avoid obstacles) (1cog)
│
├──RC_Car-Watch v1-0.spin (Watch for errors and low battery) (1 cog)
│ │
│ ├──ASM ADC code (monitor battery level) (1 cog)
│ │
│ └──Simple_Serial.spin (Debug back to PC)
│
├──RC_Car-Scan v1-1.spin (Sweeps PING sensor back and forth on a servo to watch for obstacles) (1 cog)
│ │
│ ├──servo4.spin (Controls servo that PING is mounted on) (1 cog)
│ │
│ ├──HM55B Compass Module Asm.spin (1 cog)
│ │
│ └──HM55B Compass Calibration.spin
│
└──RC_Car-Motors v1-2.spin (Controls the motor controller and a H-bridge to steer and drive) (1 cog)
│
└──Simple_Serial.spin (Talks to the motor controller) (1 cog)
Thanks,
-Matthew
John Abshier
tb6612_3.spin is h-bridge driver. It doesn't use a cog but uses pwm_32_sv2.spin for pwm control which does use a cog. pwm_32_sv2.spin can also conrol servos. It will share a cog across all the uses of pwm_32_sv2.spin for all pwm and servo usage. It is a variation of beau's pwm_32_v2.spin, it can handle 32 pins as pwm or servo, the main diff from Beau's version is the shared cog.
So you can repace your h-bridge controller and your servo controller - 2 cogs with this that uses 1 cog.
@Timmoore, wow, thanks a lot! I won't be able to start working it into my program until tomorrow or maybe even Monday, but that should really help.
Thanks,
-Matthew
I still haven't tried working your PWM_32_sv2.spin program into my program, and thanks to my work schedule it looks like I won't have a chance to till Monday.
Thanks,
-Matthew
This means I now have 3 cogs free, which is more than I needed to free up in the first place!
Thanks again for the help,
-Matthew