03-13-2018 05:47 AM
Hi,
I would like to ask that I wrote this progarm on Multisim for Pic16f84 which sends bits of Data Via Pin 3 of the pic but it doesn't work, maybe there is some modifications?
2) if I excute this program without ( Device clock or CLK crystal or source), maybe that means internal oscillator, how to know the CLK?
#include <htc.h>;
int cnt, shift=0;
int byte_start=0b10110101;
void delay (void)
{
for (cnt = 0x00; cnt <= 100; cnt++);
;
}
void setport (void)
{
TRISB = 0x00;
TRISA = 0xff;
}
void main()
{
setport();
while (1)
{
for (shift= 0x00; shift <= 8; shift++);
{
PORTB|=(1<<3)&((byte_start>>shift)& 1);
delay();
}
}
}
; } } }
03-14-2018 02:59 PM
Hi!
What do you mean when you say "if I execute this without", did you try it without the clk?
There is some good example on NI web page about the 16f84 you can look at, here is the link: http://www.ni.com/tutorial/5629/en/