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)
VIRTUAL PERIPHERALS | DESCRIPTION | SOURCE FILE Download File |
---|---|---|
SX Stack | The SX-Stack is a library of
Virtual Peripheral modules dedicated for Internet connectivity. The SX Stack
includes:
|
Web: iSX for SX52BD |
8-Bit PWM | This is a software module that creates an 8-bit PWM signal on one output port pin. This is compatible with the SX Demo Board. (thanks to Randy Glenn for recovering it!) | PWM_vp |
Multiple PWM Outputs |
This example code provides 8 PWM outputs on the PORT B pins. Each PWM is individually adjustable (through code modifications), for different duty cycles. This should be used to toggle LED's or drive small speakers directly off the PORT B pins, although frequencies of up to 1MHz are available. (thanks to Randy Glenn for recovering it!) | PWMs.src |
Bell-202 1200bps FSK output (PWM) | This VP provides a simple FSK modulation scheme. The analog voltage is generated by a 1-pin PWM D/A. This routine provides a 1200 baud, Phase-coherent FSK generation with minimal external circuitry. Designed to be compliant with the Bell-202 specification. (Thanks to Troy Duncan for recovering it) | Source (11/22/99) |
Bell-202 1200bps FSK input | This VP provides simple FSK demodulation of a 1200baud FSK signal. Designed to use minimal external circuitry and 1 I/O pin. (Thanks to Troy Duncan for recovering it) | Source (02/12/99) |
8-Bit ADC |
The traditional 8-Bit A/D converters relies on comparison with a known reference, through an amplifier, to adjust for the difference in the unknown signal. With some software tricks, we can implement a simple 8-bit A/D converters on any CMOS input to the SX device. This is compatible with the SX Demo Board. (thanks to Randy Glenn for recovering it!) | adc_vp |
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. |
|
I2C
Master Interface |
This software works with the SX Demo Board provided by Parallax to write to, read from or erase the serial EEPROM memory device. | i2cm_vp.src |
I2C Slave Interface |
This software works with the SX Demo Board provided by Parallax to write to, read from or erase the serial EEPROM memory device. | i2cs_vp.src |
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 |
SPI/uWire Low-speed Master Interface |
These Virtual Peripherals add SPI communication capability to the SX. This suite of routines cover all possible variations of SPI with high and low-speed versions of both master and slave mode operation. | spi_ml.src |
SPI/uWire High-speed Master Interface |
These Virtual Peripherals add SPI communication capability to the SX. This suite of routines cover all possible variations of SPI with high and low-speed versions of both master and slave mode operation. | spim.src |
SPI/uWire High-speed Slave Interface |
These Virtual Peripherals add SPI communication capability to the SX. This suite of routines cover all possible variations of SPI with high and low-speed versions of both master and slave mode operation. | spis.src |
Dallas iButton(TM) |
This code fragment by Dr. Imre Bartfai handles the Dallis Semiconductor iButton(TM) |
Dallis Semiconductor |
16-Bit Timer |
A simple virtual peripheral to create a 16-bit independent timer. Each timer only consumes 11 instruction cycles. This is compatible with the SX Demo Board. | timer_vp.src |
Stepper Motor Control |
This Virtual Peripheral adds the ability to control a stepper motor. This routine excites the stepper motor using half-step sequence but the excitation method can be changed to any sequence you choose simply by modifying the startstep lookup-table with the appropriate sequence of excite output. | Notes and Code |
Decoding Quadrature Encoders | Sample code and notes for reading and decodeing. |
Source |
4x4 Keyboard Scan | This application note presents programming techniques for scanning a 4x4 keyboard usually found in both consumer and industrial applications for simple numeric data entry. | keyscan.src |
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. | |
8-Bit LCD Interface | Interfacing an SX uC to a Hitachi HD44780-Driven LCD display, using an 8-bit parallel data bus without interrupts. | lcd8xmpl.src |
4-Bit LCD Interface | Interfacing an SX uC to a Hitachi HD44780-Driven LCD display, using a 4-bit parallel data bus without interrupts. | lcd4xmpl.src |
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. | |
CAN network |
SXNet - standard CAN network on SX, designed by TECTRON | Contact TECTRON |
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) |
|
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.+
file: /Techref/scenix/virtperf.htm, 25KB, , updated: 2013/7/22 16:20, local time: 2024/11/5 18:00,
3.137.222.30:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/techref/scenix/virtperf.htm"> SX Virtual Peripherals</A> |
Did you find what you needed? |