pls check old post i don't have Proteus...In post #55 you are already programming a chip (looks lit Proteus).
pls check old post i don't have Proteus...In post #55 you are already programming a chip (looks lit Proteus).
It looks like Proteus. That is why nerdguru thought you wanted to do it in Proteus. It doesn't matter. You are doing it for real in post #55. Why do you now why to simulate it? Just do it for real now.pls check old post i don't have Proteus...
What do you mean "how"? You already did it. One line is wrong. Just correct that line and reprogram the chip.but how...??
How, to simulate in MAP LAB i mean ...If you really want to simulate the code then it can be done with MPLab.
How, to simulate in MAP LAB i mean ...
But how the code is right do u think problem in hardware......You almost have it now just finish it.
Take a look here http://forum.allaboutcircuits.com/showthread.php?t=44852 It will tell you how to simulate. That picture you posted must be Isis Proteus. Can not be much elseHow, to simulate in MAP LAB i mean ...
Did you make the change nerdguru suggested?But how the code is right do u think problem in hardware......
the code is not changed.Did you make the change nerdguru suggested?
yes....Have you checked all of your connections?
seen only zero in it!even a volt meter?
Change the code nerguru has suggested.the code is not changed.
the code is not changed.
but the code is right....believe me.Change the code nerguru has suggested.
If it is as it is in post #55 then it is NOT right. Or at least may not working depending on which bit of the port the led is connected to.but the code is right....believe me.
#include <htc.h>
__CONFIG(LVP_OFF & BOREN_OFF & PWRTE_ON & WDTE_OFF & FOSC_XT);
#define _XTAL_FREQ 4000000
char dummy;
void main (void)
{
TRISB=0;//all pins set as ouput
while (1)
{//endless loop
dummy=~dummy;
PORTB = dummy;
__delay_ms(1000);
}
}
The problem here might be due to the read-modify-write construction of the chip.
Try this
Rich (BB code):#include <htc.h> __CONFIG(LVP_OFF & BOREN_OFF & PWRTE_ON & WDTE_OFF & FOSC_XT); #define _XTAL_FREQ 4000000 char dummy; void main (void) { TRISB=0;//all pins set as ouput while (1) {//endless loop dummy=~dummy; PORTB = dummy; __delay_ms(1000); } }
Something like thisMy suggestion is to just get the light to turn on all the time as I suggested in post 73 the OP can then worry about turning it off.
#include <htc.h>
__CONFIG(LVP_OFF & BOREN_OFF & PWRTE_ON & WDTE_OFF & FOSC_XT);
#define _XTAL_FREQ 4000000
void main (void)
{
TRISB=0;//all pins set as ouput
while (1)
{//endless loop
PORTB = 0xff;
}
}