Barebones SX Example Schematics? Or help with required components
Where can I find example circuit diagrams using the SX28?
Currently I am·prototyping using an SX Tech board and SX-key to program an SX28 DIP using SX/B. I'm powering it with a 9V adaptor. I don't have a resonator in the oscillator socket (nothing connected to Osc1 or Osc2) and it reads the encoder fine. I take it this means the internal oscillator is fast enough? My program has:
DEVICE········· SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, PROTECT, BOR22
FREQ··········· 4_000_000
Now I'd like to transition to a battery powered·circuitboard.·I'm not sure what components I absolutely need to make my SX28 function. I'd like to power it with a 9V battery. All I'm doing is·reading an encoder and displaying the results on a 7-segment display.
I have found lots of programming info here, but I'm not sure where to look on best practices for wiring one of these.
Any help is appreciated, even if it's just a link to where I should look for the info.![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
Thanks,
Clint
Post Edited (Clint) : 11/21/2007 3:05:20 AM GMT
Currently I am·prototyping using an SX Tech board and SX-key to program an SX28 DIP using SX/B. I'm powering it with a 9V adaptor. I don't have a resonator in the oscillator socket (nothing connected to Osc1 or Osc2) and it reads the encoder fine. I take it this means the internal oscillator is fast enough? My program has:
DEVICE········· SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, PROTECT, BOR22
FREQ··········· 4_000_000
Now I'd like to transition to a battery powered·circuitboard.·I'm not sure what components I absolutely need to make my SX28 function. I'd like to power it with a 9V battery. All I'm doing is·reading an encoder and displaying the results on a 7-segment display.
I have found lots of programming info here, but I'm not sure where to look on best practices for wiring one of these.
Any help is appreciated, even if it's just a link to where I should look for the info.
![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
Thanks,
Clint
Post Edited (Clint) : 11/21/2007 3:05:20 AM GMT
Comments
If you are not using an external clock source, there's not much:
+9v -> +5v regulator (again, use the schematic from any Parallax bread- or proto-board).
+5v and GND to Vdd and Vss
.1uf cap between Vdd and Vss pins, close to the chip
+5v -> 10k -> /MCLR (pullup on reset, button to ground is optional)
+5v to RTCC if you are not using external interrupt
OSC1, OSC2, Vdd, Vss to 4pin header for connecting SX-Key or SX-Blitz
If you wire in a 3-pin SIP socket, you can put in (or take out) a resonator. It's easier to wire it in and not use it, then to need it and have to add it later. But I often leave the SIP off projects that I know will not run above 4MHZ to keep things simpler, cheaper, faster.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
http://www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx
In particular there are quite a few recent ones written by JonnyMac which use the SX28 chip. They are very well written and should help.
One thing to keep in mind when looking at any schematic using the SX28 is to check the package style used! The pinout is slightly different between the surface mount version and the DIP version of the chip.
Good luck,
Robert
Since you're planning on a 9v battery powere supply, take a look at this thread:
http://forums.parallax.com/showthread.php?p=604054
Lot of good info regarding that issue.
Thanks,
PeterM
As far as power management goes for saving battery life, are there common ways to:
1. Put the SX and possibly other powered accessories into a sleep mode when left idle for a period of time and
2. Detect a low battery and use this to turn on an LED or other indicator before powering off
I'm having a hard time finding things on the Parallax website. Where do I look for a schematic for the SX Tech Board?
2. Yes. You could use the comparator on RB to do this.
Goto parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/ProductID/399/List/1/Default.aspx?SortField=ProductName,ProductName
It's the protoboard, but schematic is essentially the same. You'll see a link there to download schematic and manual.
Happy Thanksgiving! Time to eat pie!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Post Edited (Zoot) : 11/27/2007 8:06:12 PM GMT
(I caveat 'noticable way' since I know I stressed the chip out)
New question:
For SPST switches (buttons) used for inputs, is there a way to use the SXs internal pullup resistors on the input pins to eliminate the need for external resistors? What is a good programming strategy for handling a simple input switch to perform a function once per push? Are there any good examples of this?
Thanks for your help!
In SX/B it's:
MyPin PIN RB.0 INPUT PULLUP
You can also set them in ASM by using the mode and option reg, and you can use the SX/B PLP aliases to change them during runtime. It's also a good idea to turn them on for any unused pins.
For buttons it's mostly a questions of how many and if you are debouncing or not. You can check out a good write up and some snazzy code for monitoring 4 buttons on RA in the Nuts n Volts 142 -- Game of Life for the SX by Jon Williams (aka JonnyMac). Most of his N/V columns over the last 9 months or so (?) have been about the SX and mixtures of SX/B and ASM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST