SX in September Nuts & Volts

August 20th, 2008 Timothy D. Swieter Posted in Beginner, Intermediate, SX Micro, Software 1 Comment »

Jon Williams has another article covering the SX Microcontroller in the September Nuts & Volts issue. He also promises that his next article will take a look at the new SX/B 2.0!

AddThis Social Bookmark Button

Pic to SX Code generator

August 13th, 2008 Timothy D. Swieter Posted in Advance, Beginner, Intermediate, SX Micro, Software, Tool, other mico No Comments »

The SX List is a well aged resource for those getting into the SX. It will be years before this blog could ever match the amount of information that is on that site. I was browsing the Parallax forums and I saw a link to a cool tool at the SX List. The tool converts PIC asm (MPASM) to SX asm (SASM). How neat is that? If you are familiar with Pic microcontrollers and asm, then this tool will help you to convert over and learn about the SX.

Check out the tool here.

AddThis Social Bookmark Button

Reset: Data sheet - part III

July 18th, 2008 Timothy D. Swieter Posted in Beginner, Hardware, SX Micro, Software 4 Comments »

In Data sheet - part II one of the comments asked a questions about the /MCLR function on the SX. I answered the question in the comments of that post, but we should explore the reset function a little further.

Open up your SX20/SX28 data sheet and turn with me to page 30. Just prior to this page is a detailed explanation on the reset circuit. We can read that later, but on page 30 we see a table. This table is titled “REGISTER STATES UPON DIFFERENT RESET OPERATIONS” and it shows that there are five different ways the SX can be reset. Each way is triggered by a different path and each way leaves the internal registers of the SX in a particular state. This is important to remember as you get deeper into the SX and its software.

The wakeup reset is slightly different from the other four reset options. The Power-On, Brown-Out, Watchdog Timer, and MCLR all initialize the chip to start the code execution over. The wakeup is slightly different and continues execution where the program left off last. The wakeup is commonly used to put the SX “asleep” to save battery and processing. I need to read more myself before I can explain this further.

How about a brief description of each reset:

  • Power-On: As the name suggests the reset condition when the device is first powered on. The MCU is kept off until the voltage crosses a certain threshold and is stable.
  • Wakeup: This reset condition is usually caused by an external event to cause the MCU to stop “sleeping” and to start processing again.
  • Brown-Out: If your Vdd supply voltage (+5 or +3.3) dips below a threshold the MCU will turn off to ensure it does not create erratic output. A dip in the Vdd could be from low batteries or from motors turning on and off.
  • Watchdog Timer: This reset is a good option in critical systems where you must ensure that the chip is operating at all times. What I mean is you can set a timer in the MCU. If the timer expires before the software gets around to servicing the timer, then the MCU resets. This can help to ensure the MCU doesn’t lock up or get stuck processing one thing when it should be doing another task.
  • MCLR: This reset is similar to the Power-On and Brown Out, but this reset is often caused by a user or some other external event. The circuitry inside the chip for Power-On, Brown-Out and MCLR is similar.

OK - now go ahead and read page 28 and 29 if you haven’t. The description is a little technical if you are not familiar with electronics. The basic thing to understand though is that the instant you apply power to a system the MCU isn’t on yet. There is a slight delay, very small, that keeps the MCU off until the Vdd has stabilized.

That is about enough of an overview of the reset for now.

AddThis Social Bookmark Button