I suppose I should post this in the general discussion thread, but I wanted to let those who have greatly helped me. My code is reasonably complete and running, thanks to all of you.
I wrote a little test snippit, as I was curious as to which ran faster in the attached test, suprise, they ran the same as the o-scope shows. Both executed the pulse at 500 ns.
First puls is PulseOutInv test
2nd Pulse is line by line code
.;--------Set up chip info --------------------------------
#chip 16F886
#option explicit
;#include "lcd_driver.h"
#define DtoAClock PORTc.4 'pin 15
#define DtoADir Portc.5
'Set port directions
DIR DtoAClock OUT ;pin 15
DIR DtoADir OUT ;pin 16
;-------------Test loop for pulse------------------------------ ;
do forever
I suppose I should post this in the general discussion thread, but I wanted to let those who have greatly helped me. My code is reasonably complete and running, thanks to all of you.
I wrote a little test snippit, as I was curious as to which ran faster in the attached test, suprise, they ran the same as the o-scope shows. Both executed the pulse at 500 ns.
First puls is PulseOutInv test
2nd Pulse is line by line code
.;--------Set up chip info --------------------------------
#chip 16F886
#option explicit
;#include "lcd_driver.h"
#define DtoAClock PORTc.4 'pin 15
#define DtoADir Portc.5
'Set port directions
DIR DtoAClock OUT ;pin 15
DIR DtoADir OUT ;pin 16
;-------------Test loop for pulse------------------------------ ;
do forever
loop
Last edit: Paul Haug 2017-03-15
And that is with a 16F886 operating at only 8 MHz, You could add a 20 MHz resonator to that chip and then get more than twice the performance
It is always a good practice include the MHz after the chipname as this tell GCB how to correctly calculate the delay times.
Super suggestion, William. I will do that.