Real hardware works, proteus does not

Status
Not open for further replies.

bmandl

Full Member level 4
Joined
Feb 26, 2010
Messages
210
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Slovenia
Activity points
3,006
Recently, I build my project hardware on protoboard and it works. Then, I decided to test simulation in proteus. But seems, that proteus don't like my way of coding.
I am using DS18S20 digital temperature sensor, zero cross detector and PIC16F877A. I am trying to implement phase regulation of heater with triac. This part comes after I manage to get sensor working in proteus. Can someone please test this design and tell me if it works on his PC? I am using proteus 8.0 SP1 (Build 15611) with advanced simulation. Is it possible, that there is any problem with sensor model? On real hardware it works like a charm.


 

Attachments

  • kontrola_akvarija.zip
    315 KB · Views: 128

Oooohhhh Mighty Proteus.
I never used it, just plain ol' hadrware :grin:. Too expensive piece of crap to even bother installing it.
Anyway, I don't trust simulators, much.
 

So, no one has any idea about this? How is this even possible? If it works in Proteus and not in hardware, I would believe, but other way around?
 

You didn't describe what "doesn't work means", what is the exact area that has a problem
 

Ok, I thought, that picture will tell more than thousand words, but anyway: It looks like model for sensor DS18S20 doesn't understand my code, but real one does. I don't know why, and I don't know what is happening behind. Is sensor even responding to my reset pulse or not? Please, compare two pictures, I posted higher above.
 

A friend of mine used to use Proteus quite a lot and found that, at least, 20% of operations does not work the same way as they work on different PIC/ATMEL microcontrollers.
There is no bug free software, but Proteus has a lot of them, some modules are ill implemented, ...

(link to the post that I'm interpreting: https://www.elitesecurity.org/p3365060)
 

Ok ZASto, I still think that Proteus can be real useful in different situations at least because of that, it has Spice simulator, which we are using on faculty and it is real powerful tool. Proteus on the other hand offers simulation of microcontroller devices, which is even more powerful property. And I don't blame them if some of the functions doesn't work perfect. And for that, I want to get down with the thing and find out what is wrong. And for that, I am asking on this forum. I don't want yours or any one elses opinion if Proteus is good or bad. I figured this already myself, thank you.
 
Last edited:

Even if everyting is working you could still see this effect.

The simulator should be using worst case timings, and the real part will mostly be better then that so may well work at least most of the time with code that is failing to meet the worst case timing constraints (and thus failing in simulation).

Stick a scope or logic analyser on the hardware and see if you are in fact reliably meeting the timing constraints (Setup and hold times in particular).

Regards, Dan.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…