Jump to content

Pic16f84a Simulation Failure


Recommended Posts

:(

 

Bug description:

Simulation of set_bit (porta,4) wont work.

porta has 5 bits.

this problem is 100% reproduceable & happens every time.

 

#include <system.h>

 

void main()

{

trisa = 0;

porta = 0;

 

porta = 16;

set_bit(porta,4);

}

 

 

 

IDE version: 6.6

Compiler: BoostC

Compiler version: the one in this package installer

Target device: PIC16F84A

OS: WINDOWS xp PRO SP2

 

Comments:

I just can't set this bit (on simulation mode).

 

Regards,

Jorge

Link to post
Share on other sites

This does not work for many devices,

you need to check the list of supported devices

(i did not for this one) for the existing plugins used

in the simulator.

 

i commonly run accross this problem so much that

i stopped using the simulator and use a scope or

just wire up an LED to the pin.

Link to post
Share on other sites
:(

 

Bug description:

Simulation of set_bit (porta,4) wont work.

porta has 5 bits.

this problem is 100% reproduceable & happens every time.

...

Comments:

I just can't set this bit (on simulation mode).

This behavour is actually correct.

PIN RA4 is of open drain type. This means it can only sink current.

The led block requires a current source to illuminate the LEDs.

What you really need is an LED block that will operate with current sinking, which we don't have :(

 

So RA4 simulation is correct, connect hardware in exactly the same way and you get exactly the same result!

 

Regards

Dave

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...