Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

CONFIG3H (OshonSoft P18 Simulator IDE)

bcz

New Member
I am new to OshonSoft (bought P18 Simulator IDE) and to the forum.
Vladimir sent me a short code to check if my programmer would work with his Simulator.
Everything works fine, but there is a discrepancy in the CONFIG3H byte, which I can't explain.
Please have a look at the screenshot attached.
Any comment is appreciated.
Robert
 

Attachments

  • BASIC Compiler robert_test.png
    BASIC Compiler robert_test.png
    813.3 KB · Views: 23
This is the difference, "03" has the MCRL pin disabled (External Reset). In order to work with MCLR activated you have to place a pull-up resistor on that pin.

MCLR-ON.JPG
 
Last edited:
"place a pull-up resistor on that pin"
How do I do that? - As I mentioned, I am new to Oshon Basic.
Robert
 
It’s possible I didn’t explain myself clearly. I only aimed to clarify the discrepancy in the value of the register; this does not mean you have to use the MCLR pin. If you are just starting and are not yet clear on how inputs work in microcontrollers (MCLR is an input), I think it’s better not to enable it.

The MCLR pin functions similarly to momentarily turning off the power and then turning it back on—it triggers a reset. However, the challenge with the MCLR pin is that for it to work, it’s not enough to simply enable it; it also requires an external pull-up resistor and a push button, at least in its basic configuration for manual use.

A common mistake among beginners is enabling the MCLR pin without understanding that it is an input. Inputs on microcontrollers—and generally on all chips, especially those using CMOS technology—must be polarized, either through an internal or external resistor. If this polarization is not implemented, the input will float, resulting in random states that may cause sporadic resets, driving you crazy in this particular case.
 
DogFlue66,
Thanks for the detailed explanations.
I think you will have a better understanding of my problems/questions if you look at my new posting
with the title "Moving from mikroBasic to OshonSoft Basic".
I have to study the relevant manuals for both Basic versions.
I never done anything with mikroBasic since 2010 and I am just starting with OshoSoft Basic.
I definitely want to re-write my code with OshonSoft.
Merry Christmas,
Robert
 

New Articles From Microcontroller Tips

Back
Top