antti@sistudio.com wrote: > > Hi > > If you want 4 Pins to output 62.5 Khz > > and at the same time 2 more pins to output adjustable frequency, than > that might be a little bit tricky, if you need the 62.5 to be very > stable (ie no jitter) > > also it important how many steps you need from 100Hz to 5KHz. > . > > hm it is doable, yep the 4 outputs should be D0..D3 of on port to > consume time, I think even at 4MHz clock you can run it fully as > polled software loop ie no interrupts. > > You in loop until it is time for 62.5 KHz edge then you inc (port) > and deceement a counter (for the variable frequency ouptut) when > it overrolls you update the second var freq output, and reload counter. > > not giving 100% that it goes at 4MHz, but with very programming I suppose > it doable at 8 or 10MHz clock you would not have any problems. > > I wrote a dual FM genrator for PIC, it runs two Frequency synthesizer > algorihtms both up to 30 KHz, at 4MHZ PIC clock. > > antti > > pls ask if you need more help:) > > -- Silicon Studio Ltd. > -- http://www.sistudio.com Antti- appreciated. You are the only one who gave me any concrete answers to start out with. Everyone is interested in plans, however, if I can't simplify the circuit into a PIC, then no one will be able to build the plans easily (which I will post anonymously at John Bedini's site (http://www.nidlink.com/~john1/tesla.html)! The chip need not be ultra frequency stable, simply because the resonant frequency of the HOH atom has memory and that it approaches its own resonance, again, you would have to be looking at the patent to notice this. rem, it should not be too bad I will start out with some code I think will work. Crawling before walking: from david tait, here is some short code that amused me LIST P=16C84 MOVLW 0 TRIS 6 OPTION LOOP SLEEP INCF 6,F GOTO LOOP END causes RB0-RB7 to increment 00000000-->11111111 which means we are halfway there, so to modify this statement, we only need the fastest pin going at f, which we can tweak with a variable RC clock, and we only need to tris 4-pins as 4-bits. Rem 4 resistors sums this, so LIST P=16C84 CLRF PORTB BSF STATUS, RP0 MOVLW 0xC0 ; RB(6-7) as inputs from pushbuttons ; RB(4-5) as the two other counted outpu ts ; RB(0-3) as the 4-bit up count outputs MOVWF TRISB OPTION PUHARICH INCF 6,0 ; this is where I have my question- how to increment only RB(0-3), and so I assume 6 is port B and 0 is for RB(0-3) but this is where the 4-bit count is satisfied for the fusion drive circuit, next the Tesla Switch circuit pins RB(6-7) DECFSZ reg,1 ; you said decrementing a counter,ok, so I think you mean subtract until a carrier number decided by the bounceless switch routine is met for toggling RB(6-7) at the lower frequency, I will constantly subtract F from the reg and if this breaks to zero I it calls routine Tesla for RB(6-7) which means I have to set the reg as the carrier switch. I think this keeps the 4-bit count sequence constant! GOTO PUHARICH TESLA INCF 6,C ; toggle RB6 COMF 6,C ; have to complement the RB7 from RB6 bu t don't know how ! END Once the relationship between the registers is properly fixed, I then need to revamp this whole set of code and put in the bounceless switch routine to determine the reg variable. Note that even though the reg setting part from the bounceless switch may not work at first, the fusion drive pins RB(0-3) should still kick, and there should be some sort of output on the Tesla Switch pins RB(6-7) pins I hope. You know, for a someone who has lost his instruction set assembly knowledge, I think I can study up on this. Apparently, this program does not need a whole lot of subroutines. I am doing this thing out of compassion for everyone, not for money, for free. I suppose time waits for no one, so that is why I will try and "wing it" in the here and now. P.S. I ignored the 3 second delay on and off for the 4-bit sequence, but I suppose it could be implementable later somehow, but it is not extremely critical.