please dont rip this site

Virtual Periperals

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:
  • The network access layer, served by the PPP (Point-to-Point Protocol)
  • The Internet layer, served by the IP (Internet Protocol) and ICMP (Internet Control Message Protocol)
  • The host-to-host transport layer, served by the UDP (User Datagram Protocol) and TCP (Transmission Control Protocol) (for SX28AC)
  • The application layer, served by the HTTP (Hypertext Transfer Protocol), (iSX for SX52BD) SMTP (Simple Mail Transfer Protocol), and POP3 (Post Office Protocol) (eSX for SX52BD)

Web: iSX for SX52BD
eMail: eSX 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
PDF

(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
PDF

(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.

Frequency Detection VP

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
PDF
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
PDF

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
 iButton Interface

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
PDF
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
PDF

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.

buttons_vp.src
PDF

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
PDF
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
PDF

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

lcd.src

USB Keyboard Demo

California Dreamin SX USB Keyboard Demo by Michael Hetherington Used in the EXCELLENT Atapchi: World's Smallest Low-speed USB Analyzer

Source

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.

netchip.com/USB_literature.htm

Binary to 7 segment LED Converters

Binary to 7 segment LED Converters

seven_seg.src
seven_seg.pdf

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.

bargraph.src
PDF

CAN network

SXNet - standard CAN network on SX, designed by TECTRON

Contact TECTRON

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

Additional Virtual Peripherals useful for modem applications

Virtual Peripherals Description Source File
Download File
DTMF generation (PWM) Algorithmic DTMF (touch-tone) generation via 1-pin PWM D/A. Uses only minimal external hardware and 1 I/O pin. Source
PDF

(02/12/99)
DTMF generation (R2R) Algorithmic DTMF (touch-tone) generation via 8-pin R2R-ladder D/A. Uses only minimal external hardware and 8 I/O pins. Available soon
Bell-2021200bps FSK output (R2R) This VP provides a simple FSK modulation scheme. The analog voltage is generated by a 8-pin R2R-ladder 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. Source
CallerID detection This VP provides Type I CallerID demodulation. Uses FSK demodulation VP and additional subroutines to parse the CallerID data. Designed to use minimal external circuitry and 1 I/O pin. Source


(02/12/99)
Ring detection This VP provides detection of ring signal from telephone line. Designed to use minimal external circuitry and 1 I/O pin. Source
PDF

(02/12/99)
Artificial Sine Wave Generator Sine Wave Generation utilizing one PWM output and an algorithmic approach to sine generation Source
PDF
2400-230.4K UART This is a simplified software module that communicates over an RS-232 port to a PC and will echo back what is received. This is compatible with the SX Demo Board. uart_vp.src
PDF
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
PDF
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
PDF
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
PDF
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
PDF

Lost files:

Comments:

See:

Questions:


file: /Techref/scenix/virtperf.htm, 25KB, , updated: 2013/7/22 16:20, local time: 2024/11/26 21:35,
TOP NEW HELP FIND: 
3.148.117.237:LOG IN

 ©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?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/scenix/virtperf.htm"> SX Virtual Peripherals</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .