Jorge 0 Posted June 30, 2007 Report Share Posted June 30, 2007 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 Quote Link to post Share on other sites
emte 0 Posted July 5, 2007 Report Share Posted July 5, 2007 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. Quote Link to post Share on other sites
Dave 0 Posted July 5, 2007 Report Share Posted July 5, 2007 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 Quote Link to post Share on other sites
Recommended Posts
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.