Swordfish (also known as SF) offers a truly structured and modular approach toward program development - very similar in some respects to programming with Visual Basic.
Swordfish produces extremely efficient and stable code. For more information or assistance, please visit the forum.
Free version limitations; 200 variables on compile, no program length restrictions. Download.
I had a couple of issues when using David Barkers module NMEA.bas on my Big GPS Clock project. In particular, variables were being corrupted making the program very unstable.
I'm not familiar with Davids programming approach, so I went on to create my own NMEA parser.
Here's a list of commonly used Swordfish User Modules I tend to use. If you would like to add your own user module to the pack, please post a request in the forum!
Download the User Module Pack: User Module Pack.zip
Name ...
Download the module: Servo.bas
Full credit is given to MichealM, whose method of controlling servos - posted here - forms the basis of this module.
This module controls between 1 and 8 hobby servos connected to PortB. The module will only affect the pins which have servos connected...
After a recent discussion on the forum regarding shift registers, I thought I would share what I have done with the feedback from others.
Whats a MCP23S17?
Its a 16-Bit I/O Expander with Serial Interface. In other words, it extends the number of logic I/O's available to a micro controller (handy for driving a large number of LEDs for example!).
Want to be able to transmit data effectively, reliably, and most importantly wirelessly? Well Infrared modulated UART could be the cheapest and most effective solution. This guide provides a great solution for remote control and wireless data communication, and while it only covers the fundamentals, the possibilities are up to you. With the circuits/products and programs listed below, I have been able to achieve over 20 meters of IR data communication.
Download the module: RandGen
This module implements a simple modulo-based PSEUDO Random Number Generator for Swordfish Basic. It's difficult to generate true random numbers from a deterministic machine like PIC. Hopefully, some mathematical methods let us have a series of numbers that seems really random, although they have all a fixed cycle upon which they restart to give the...
External EEPROMS are great for storing data, and to interface with them is not all that hard. Most use the I2C protocol. In this example the 24LC256 is used. I2C communication is great as it can allow serial data communication between many devices on a single 2 wire bus. These two lines are referred too as SDA and SCL. Basically SDA is the serial data and SCL maintains the clock/frequency in which data is transferred.
Like most peripherals,...
User Module Downloads for this tutorial
Pre-Notes:
LCD's don't require continual updates/multiplexing to display data, and require less Input/Output pins to interface with.
Using interrupts to multiplex will interfere with long delays and loops (eg, DelayMS(100) could take ~105ms to complete while multiplexing.
For a brief overview on how a 7 segment display works, see the single...
This is a very limited example of segment displays. For full functionality and extended library support, please go to the multiple segment display tutorial.
7 segment displays are a cheap and effective way to display data. The only real downsides to them are;
Unable to retain data if more than one display is used (ie, need to continually refresh each...
This tip is almost trivial, but it's a D'uh moment too. Just in case anyone else has missed the obvious. here's a quick tip.
I usually use Swordfish's hardware UART routines and I don't recommend Swordfish's software UART for input, where there...
When developing an embedded application using analog sensor inputs, testing at specific sensor levels can be difficult. For example, in my icemaker controller project, actions need to occur at certain water levels. Using the actual sensor...
I recently had use for the simple signal generatorI described before for testing out some piezo buzzers I got for next to nothing. I reloaded the code onto a TAP-28 board...
Header pins are ubiquitous on dev boards. Jumpers can be used to make connections during tests and code development but real-world applications need reliable connections. Connectors for single row headers have always been a problem for me,...
I had a couple of issues when using David Barkers module NMEA.bas on my Big GPS Clock project. In particular, variables were being corrupted making the program very unstable.
I'm not familiar...
I'm working on a control system that will have several relays, a bunch of LEDs and a number of switches. I was rapidly running out of port pins on a TAP-28 board to handle all the desired I/O. Possible solutions included adding an I2C port...
Recent Comments
Thanks Graham, I was afraid I was describing the obvious... I hat...
By Jon Chandler
I'm not sure how many times I have included a separate header for...
By Graham
ohararp brought up a good point on the Swordfish forum: To see th...
By Jon Chandler
I hope this hasn't been obvious to everyone but me :)
By Jon Chandler
I added a couple pictures showing the 10-turn pot I use in an enc...
By Jon Chandler