Hi All,
I am still learning to keep my brain from drying and I will appreciate any tips or tricks
to show me how to work in right way.
In early eighty I already learned processor architecture and had learning experience
How to write program in binary that processor understand (just BIOS).
I did not use this knowledge in my working experience.
Right now PIC for me is just a nail and PICBASIC PRO is just a hummer.
So using both of them I able to put together hardware and technology.
Doing this in easy way I am pretty sure that double core PIC has
advantage than using single advanced and expensive PIC for multitasking program
Especially if you are not a ghost living in microprocessor and manually turn on or off
bits in registers.
In my example I am not agree that to generate frequency and find minimum can be done
by using one comparator:
OSC 20 MHz
NUM var WORD
DELTA var WORD
CMCON=%00000101 ‘ set
DELTA = 2500
Run:
PORTB.0 =%00000001
CALL WAITA
IF CMCON=%10000101 Then Delta = DELTA -1‘ if digital more than reference
PORTB.0 =%00000000
CALL WAITA
GOTO RUN
WAITA:
FOR NUM = 0 TO DELTA
@ useless statement
NEXT NUM
OR write statements in assembler or better in binary code
For frequency 200KHz period on is equal 2.5uSec and off 2.5uSec.
For right heating condition needs to be in 10Hz range so 200000+10 = 200010KHz
It is means steps on is equal 1.5nSec and off 1.5nSec.
So variable NUM has step 1.5nSec and max value is equal 3333
For 500KHz you can calculate more strange numbers.
How is it possible to send SEROUT message that last 2mSec when microprocessor
Is Working on generating frequency and time needed for one operation is 200nSec?
My guess that your expertise ends here because using one PIC cannot do this task
Any comments?
Best Regards to ALL
Bookmarks