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.
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.
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, ...
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.
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).