![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi, I need to know, if is posible in the pic16f84a, to start a program, keep this program running, an start another, and Who? Regards. | |
| |
| | (permalink) |
| YES-----Almost! A 16F84 and most computers can only do one program at a time. Your PC may look like it is working on many programs but it is only working on one at a time. I have a PIC16Fxxx running a program most of the time. Every 0.01 seconds the computer jumps to an interrupt program. It runs for about 0.001 seconds then goes back to the main program. To the human eye it appears that both programs are running at the same time. | |
| |
| | (permalink) | |
| Quote:
Generally you can do what you want in this sort of thing, but it's far better to be specific - you could write a real time multitasking OS, but you absolutely cripple performance, as Windows does!. I suggest you ask us exactly what you're trying to do!. | ||
| |
| | (permalink) |
| I use RA0, RA1, RA2 and RA3, to control a step by step motor. RA0 goes to the first coil, Ra1 goes to the second coil and etc. I need that RA0, RA1, RA2 and RA3 run always, because the others pins, RB0-RB7 as been used to sensors and switches. How I do to keep RA0, RA1, RA2 and RA3 working ? | |
| |
| | (permalink) |
| Dead simple, and standard programming - you use a timer interrupt to move the stepper. It's basically how Windows (or Linux) does multi-tasking, but without the overhead. | |
| |
| | (permalink) |
| Who I do that? | |
| |
| | (permalink) | |
| Quote:
For a start I would suggest dumping the antique 84?, it doesn't have a lot going for it - it's replacement the 16F628 is cheaper and higher spec. My tutorials show how to use tmr2 to multiplex seven segment displays, or 64 LED's - similar timer code code be used to drive a stepper motor. | ||
| |
| | (permalink) |
| You can also get some sample chips from microchip for free. That goes for antique chips to the really fancy chips. For programming, on top of learning on some hardware characteristics from sample code and datasheets, may be helpful to look at structures of c programs as well or assembly. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Using Oscilloscopes | mechie | Electronic Theory | 9 | 29th November 2007 10:49 PM |
| 10 MHz only WWW time signal receiver | atferrari | Electronic Projects | 3 | 6th July 2007 02:17 AM |
| Logic switching time on an input port question | FusionITR | Micro Controllers | 8 | 24th March 2006 03:58 PM |
| Multisim Simulation Speed Question | otacustes | Electronic Projects Design/Ideas/Reviews | 8 | 23rd March 2006 07:20 PM |
| PBX question | waqar | Electronic Projects Design/Ideas/Reviews | 0 | 30th March 2003 07:21 PM |