Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Question: Reset pin of 8051 mcu.

2 posters

Go down  Message [Page 1 of 1]

1Question: Reset pin of 8051 mcu. Empty Question: Reset pin of 8051 mcu. Fri Sep 22, 2023 7:10 pm

royqh1979



In R1910, the reset pin of 8051 must be connect to a (power-offed) volt source, or the hex file won't get running after simulation started.

I've tried connected to other component, such as an empty switch, it won't work.

Is this a feature, or a bug?

2Question: Reset pin of 8051 mcu. Empty Re: Question: Reset pin of 8051 mcu. Sat Sep 23, 2023 6:44 am

arcachofo

arcachofo

Not a bug, this is how it works now: It must be something driving the reset pin to "not active" state if not it will not start.

8051 is a bit special because reset is active high.
What happens in a real device if you don't connect reset pin?

3Question: Reset pin of 8051 mcu. Empty Re: Question: Reset pin of 8051 mcu. Sat Sep 23, 2023 7:19 am

royqh1979



arcachofo wrote:Not a bug, this is how it works now: It must be something driving the reset pin to "not active" state if not it will not start.

8051 is a bit special because reset is active high.
What happens in a real device if you don't connect reset pin?


So, in simulation, connected to a power-offed source is treated as 0V, but not connected is treated as unknown?

4Question: Reset pin of 8051 mcu. Empty Re: Question: Reset pin of 8051 mcu. Sat Sep 23, 2023 7:39 am

arcachofo

arcachofo

So, in simulation, connected to a power-offed source is treated as 0V, but not connected is treated as unknown?
Something like that...

The reset pin needs to have the proper voltage and most MCUs and MPUs need a high state to start, so the device will not run until there is an state change Low to High.

This does not fit very well with 8051, but in any case it needs a source that pull the pin down.
For me the question would be: an 8051 with reset pin not connected is guaranteed to run?

5Question: Reset pin of 8051 mcu. Empty Re: Question: Reset pin of 8051 mcu. Sat Sep 23, 2023 8:32 am

royqh1979



arcachofo wrote:
So, in simulation, connected to a power-offed source is treated as 0V, but not connected is treated as unknown?
Something like that...

The reset pin needs to have the proper voltage and most MCUs and MPUs need a high state to start, so the device will not run until there is an state change Low to High.

This does not fit very well with 8051, but in any case it needs a source that pull the pin down.
For me the question would be: an 8051 with reset pin not connected is guaranteed to run?

En, I rechecked the 8051 manual and found the following figure:
Question: Reset pin of 8051 mcu. Snap124

6Question: Reset pin of 8051 mcu. Empty Re: Question: Reset pin of 8051 mcu. Sat Sep 23, 2023 8:38 am

arcachofo

arcachofo

I guess that should work in simulide.

7Question: Reset pin of 8051 mcu. Empty Re: Question: Reset pin of 8051 mcu. Sat Sep 23, 2023 12:16 pm

royqh1979



arcachofo wrote:I guess that should work in simulide.
Yes.
And I found a issue while I experimenting this config:
- Connector lines not correctly updated/redrawed in the simulation and the option animate is on.

In Simulator::timerEvent():
Code:

        if( (m_RefTimer.nsecsElapsed()-guiTime) > 2e8 ) // Animate at 5 FPS
            Circuit::self()->updateConnectors();
It seems that m_RefTimer.nsecsElapsed()-guiTime wil never greater than 2e8, if your machine is fast enough.

Maybe a new member var is needed to save the last time updateConnectors are called?

8Question: Reset pin of 8051 mcu. Empty Re: Question: Reset pin of 8051 mcu. Sat Sep 23, 2023 1:15 pm

arcachofo

arcachofo

It seems that m_RefTimer.nsecsElapsed()-guiTime wil never greater than 2e8, if your machine is fast enough.

Maybe a new member var is needed to save the last time updateConnectors are called?
you are right, there is an error there.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum