Archive

Archive for the ‘Links’ Category

Cool lightweight statemachine/thread library in pure C

June 25th, 2007

While searching for informtion on statemachines to be used in my “Safe 12vdc to 220vac inverter control box” i sumbled upon an extremely lightweight stackless threads library called ProtoThreads. Although I don’t think I can’t use it because of the stack limitation on the PIC12F508/9 or PIC16F84 that i plan to use, it is worth mentioning.

Here is an abstract of descripton found on the webpage:

Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system to provide blocking event-handlers. Protothreads provide sequential flow of control without complex state machines or full multi-threading.

A simple task is defined like this:

#include "pt.h"

struct pt pt;
struct timer timer;

PT_THREAD(example(struct pt *pt))
{
  PT_BEGIN(pt);
  while(1) {
    if(initiate_io()) {
      timer_start(&timer);
      PT_WAIT_UNTIL(pt, io_completed() || timer_expired(&timer));
      read_data();
    }
  }
  PT_END(pt);
}

Benjamin Sølberg Electronics, Links

Convert your old PC ATX PSU to a powerful lab supply

June 18th, 2007

Here is a good link on how to do it, including background information..

http://web2.murraystate.edu/andy.batts/ps/POWERSUPPLY.HTM

Benjamin Sølberg Electronics, Links

Electronics links

May 24th, 2007
  • discovercircuits.com - discover circuits, has 25,000+ electronic circuits or schematics cross-referenced into 500+ categories. As a vital resource for engineers, hobbyists, inventors & consultants, the site’s collection of information will help you find quick solutions to electronic design problems.
  • Electronics Lab - find useful circuits with full description, diagrams and PCB, electronics articles, links and downloads. Very cool site for electronics

Benjamin Sølberg Links