Proteus isis !!!

Thread Starter

Rk17

Joined Apr 23, 2011
43
hi guyz just want to ask.. how do i set the pins of 16F84a to inputs like what this guy did in this video

Rich (BB code):
http://www.youtube.com/watch?v=HBkbDJGybzk&feature=related
but he is using a diff. simulation software which can set port a or port b high/low.. How could i do that on proteus because in proteus its all outputs i cant figure out how to set the pins as inputs tnx!
 

Thread Starter

Rk17

Joined Apr 23, 2011
43
i use c..

Rich (BB code):
 #include <htc.h>

#define _XTAL_FREQ 4000000

main(){


TRISB=0xFF;
TRISA=0x00;
PORTB=0xFF;
while(1)
{
_delay(500);
PORTA=0xFF;
_delay(500);
PORTA=0x00;
}
}
 

Thread Starter

Rk17

Joined Apr 23, 2011
43
when i simulate in proteus the delay works but when i use the other software(ohosoft) it does not work. So what im asking is how to use the pins in proteus as inputs because in ohosoft i can use them with just a click.. have you seen the video?
 

t06afre

Joined May 11, 2009
5,934
Are you doing simukations in Proteus only. Or do you do some hardware testing also? by the way do have to use the old 16f84 or can you use some newer and better chip. Can you post your Proteus project
 

Thread Starter

Rk17

Joined Apr 23, 2011
43
ive got it already.. i just used switches connected to the supply, when the switch is on it has high input and if its off has low input


Rich (BB code):
 				 			 			 			 		  		 		 			 			Are you doing simukations in Proteus only. Or do you do some hardware testing also?
i do simulations and if it works thats the time i do it in hardware
 

Attachments

t06afre

Joined May 11, 2009
5,934
:eek:
Some important things. Always use a series led then connecting a LED to a MCU 330 ohm is OK to use then using 5 volt as power supply. Your schematic was a real mess. If you post something like this in forums. People will most probably refuse to even look at it. For your own shake keep the lines tidy. Do not create spaghetti schematics ;)
I have cleaned your schematic up somewhat. What is the project meant to do? Also what is the meaning with the thyristor.
In your code you do not set the configuration word. This must always be declared.
It may be that your hardware setup did work in the simulator. But it would never have worked in the real life setup. But do not worry. As I said before. Give your self time to learn and fail..
 

Attachments

Thread Starter

Rk17

Joined Apr 23, 2011
43
oh bout the scr,, i was just trying to experiment a little bit doesnt mean much hehe.. BTW what do you mean by
Rich (BB code):
In your code you do not set the configuration word. This must always be declared.
can you please give me an example?? is this the _CONFIG (etc.)

But it would never have worked in the real life setup
how can you be so sure? im not done yet

>> it worked in the simulation so most probably it will work in real life ill post the video once its done.... :D
 
Top