At 50-100 MIPS (not just MHz, MIPS!) SX uCs are so fast, that many hardware functions can be "virtualized" into the software, reducing chip count and increaseing versatility. Turning a hardware chip into a processor routine is a lot easier that you might think...
Dmitry Kiryashov [zews at AHA.RU] says
You are to run 10 tasks "simultaneously". 4 of them are counting pulses (or reading some buses if you would like to ;) while 6 others are some timing, converting information, sending and receiving RS232 stuff. Each slice of code has some execution time t1,t2,t3,... You can run everything in straight way in one loop when one follows by another but you will got total loop execution time exactly equal to t1+t2+t3+...+t9+t10 which is enormously huge ;) Forgot to mention that those pulses of course are longer than 10 sampling periods.But you can reduce it significantly if will run each task separately in different time slots. Timer constantly generates required slots. Two different types of processes: constant rate happened and floating. Sampling ports and doing RS232 for instance are constant rate processes. Those should be sampled by every pass but finding edges can be scheduled for later. continued...
Stephand Holland says:
All VP's are written assuming that ADD with Carry is not enabled. The benefit that enabling of ADD w/C has for a few routines, is far outweighed by the overhead required in the rest of the code.
Virtual Peripheral User's Manual in PDF and Text
Local Mirror/Index of the Ubicom Virtual
Peripheral Library (Cached 20010910)
see also: SXList.com Code
Library (especially the IO section)
Web: iSX for SX52BD
eMail: eSX for SX52BD
Frequency Detection from an Analog Signal Using a Software
Sigma-Delta 1-bit A/D
This example program measures power present at a specific frequency.
The program is designed to run through a terminal connection to a PC, with
the baud rate defined in the source code.
The user is asked to enter a frequency from 0 to 13107Hz in decimal, and
the program measures the amount of power present at that frequency.
SX to SX SPI Interface
This application note provides an example of data transfer between two
SX microcontrollers through the SPI data
bus. This demo consists of two programs - DEMO3M.SRC and DEMO3S.SRC, which
correspond to the SPI Master and
SPI Slave sides accordingly. The schematic
file, spischdemo3.pdf is also provided.
demo3m.src
demo3s.src
sxschdemo3.pdf
Dallas iButton(TM) This code fragment by Dr. Imre Bartfai handles the Dallis Semiconductor iButton(TM)
Dallis Semiconductor
iButton Interface
Sample code and notes for reading and decodeing. Source
Push Buttons & Path Switcher This application note presents programming techniques for implementing and debouncing from 1-4 push buttons. This implementation also demonstrates the use of a path switcher (combined with a simple real-time clock ) to reduce the execution time of each interrupt.
Comparitive resistance meter with LCD Driver This software uses two software A/D converters, on pins RB.5 and RB.6, to read in a known resistance value, and compare it to an unknown, and then outputs the results on an 8-segment LCD. The RA pins drive the commons, and the RC pins drive the characters
USB Keyboard Demo California Dreamin SX USB Keyboard Demo by Michael Hetherington Used in the EXCELLENT Atapchi: World's Smallest Low-speed USB Analyzer
USB Scanner Interface USB application notes for SX used with netchip USB interface hardware. the VP is for the scanner interface, not the USB port.
Binary to 7 segment LED Converters Binary to 7 segment LED Converters
Bar Graph Display This application will create a bar graph display, similar to a signal strength meter on a stereo. By modulating the signal to the LED's, it is possible to create an analog effect on a discete, digital display.
IrDA Ubicoms' implementation of this reliable protocol on a SX microcontroller is achieved by relying on the application's ability to re-send data upon request rather than the traditional use of large data buffers. The implementation communicates at up to 115.2kbps and makes use of the SX's high clock speed to shape the IrDA pulses without external hardware. It uses two virtual peripheral UARTs: one for the IrDA port and one for a debugging serial port.
All documentation should be read in conjunction with the IrDA Specification, IrDA Lite Specification and IrComm available from http://www.irda.org.
AN16.pdf
(cached
20011105092521
and in CCS HTML)
irda_v1_0_1.zip
(cached
20011027092019)
Cryptography Eric Smith's DES and SKIPJACK cryptographic software for the Microchip PIC and Scenix SX
Comments:
I stumbled across your site. I have the following Virt Prefs that you list as "lost". LCD_XMPL.PDF lcd4xmpl.src lcd8xmpl.src I also have: UART_VP.PDF and UART_VP.SYM and uart_vp.asm which may be what you are looking for. They are yours if you want them. I use a programmer from 1999 called SXISP. I would like to know if it will work with newer SX chips or if there is another freeware version.
See:
Questions:
I was using DTMF generator Vp program.
and i am trying to use it with a SX Key demo Board 1998
is it possible ?
looking at listing i understood that i must update a var to write the number i want dialed but in an6 it wrote that it works with rs232 why?
James Newton replies: I believe so. You can either feed it a number with RS232 or change the program to just dial a single number.+
.