![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack (1) | Thread Tools | Display Modes |
| | (permalink) | |
| Quote:
Perhaps we need another new 'method' for 16F' devices (another design challenge, grin)? | ||
| |
| | (permalink) | |
| Quote:
Mike. | ||
| |
| | (permalink) |
| I like a challenge too (grin). A 2 usec update interval (10 instruction cycles?) seems aggressive but I'm sure if anyone could do it, you guys could. Remember, we need to include UART receive buffering which is implied but not shown in my previous algorithm example. Happy Holidays, Mike Last edited by Mike, K8LH; 13th December 2007 at 02:18 PM. | |
| |
| | (permalink) |
| Managed to spend some time on this and I have a working 2uS servo loop and it's just 22 instructions long. Hopefully, I'll be able to post some working code in the next day or two. Mike. Added, unrolling the loop doesn't work as there isn't 512 ram locations. Happy Holidays. Last edited by Pommie; 13th December 2007 at 02:21 PM. | |
| |
| | (permalink) |
| So how do we get 512 steps from a 256 byte array? How about if we do 4 bit output groups? Build the buffer with the first 256 steps in the right nybbles and the second 256 steps in the left nybbles. It means using more 2000+ msec output group sequences but we can probably squeeze quite a few of those sequences into the overall 20 msec servo period. What do you think? | |
| |
| | (permalink) |
| I'm treading a completely different path. My buffer is only 20 bytes long, arranged as length, mask. Outputting the buffer is pretty trivial. Building the buffer is the headache. Mike. | |
| |
| | (permalink) |
| Fascinating. I knew there had to be a better "method". Keep at it. Happy Holidays, Mike | |
| |
| | (permalink) |
| I wonder if you could use 128 bytes of RAM as a 1024 bit interval buffer with up to eight '1' bits somewhere in that buffer indicating when to exclusive-or the output port with a value from another 8 byte array? Not quite sure if it's doable but I'll check it out this coming week. Last edited by Mike, K8LH; 14th December 2007 at 03:02 AM. | |
| |
| | (permalink) |
| All intriguing ideas. I will get to this later also. Business doubled this week. Got a couple hundred new RGB dotmatrix's in... still waiting for the TS GLCD's and the new prototype TS RGB GLCD. Maybe they'll be here Monday. | |
| |
| | (permalink) |
| Sounds like interesting stuff Warren
__________________ Steve | |
| |
| | (permalink) | |
| Quote:
Mike | ||
| |
| | (permalink) |
| I will ship to you as soon as the new GLCD's come in from China. They put me off by 2 weeks. Even the US Navy and Canadian Dept of Defense are waiting... really.. | |
| |
| | (permalink) |
| Back to the topic of workable multi-channel hi-rez Servo code for 16F' devices... I think I may have a method that provides a variable number of steps at 1 usec resolution using very few ram locations. I'll try coding an example for 1024 steps which would require 24 ram locations for the ISR driver and then 2 locations for each Servo array element. Like the method Mike (Pommie) is brain-storming, this method also requires a lot of work setting up those 24 variables. | |
| |
| | (permalink) |
| A 1uS version on the 16F would be impressive. Would that also handle the serial as well. I have 2uS code for a 20MHz and 4uS code that uses the 8MHz internal oscillator and both manage to do serial with a fifo at 115.2K & 19200. I'll post them when I get a working example of the buffer build code (got most of it working just no time to tidy it.). It probably won't be until after Christmas as I'm away most of next week. Mike. | |
| |
| | (permalink) |
| I haven't been able to squeeze serial input into the 1 usec update code which was 16 MHz (4 cycles per microsecond) so it looks like I will also be going with a longer update interval. I'm also having a hard time building serial input code without the 18F' movff instruction (grin). Looking forward to seeing your method and I'll keep working on mine too. Happy Holidays. Mike | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| LinkBack to this Thread: http://www.electro-tech-online.com/micro-controllers/34390-drive-33-servos-one-pic-usart.html | ||||
| Posted By | For | Type | Date | |
| PIC Servo Driver Tutorials? - RC Groups | This thread | Refback | 16th May 2008 11:43 PM | |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Problems switchin relay with PIC | Andy1845c | General Electronics Chat | 5 | 17th November 2007 07:14 PM |
| RF receive using PIC USART | col_implant | Electronic Projects Design/Ideas/Reviews | 11 | 15th November 2007 05:06 PM |
| High ADC sampling rate PIC, 18F needed? | bananasiong | Micro Controllers | 24 | 28th October 2007 01:13 PM |
| Controlling servos with PIC16F84A | Ostekjeks | Robotics Chat | 3 | 25th February 2005 11:06 AM |
| electric car drive | franklin2 | Electronic Projects Design/Ideas/Reviews | 8 | 18th October 2004 03:30 PM |