PIC32 DMA SPI

[Mike] wanted to drive several SPI peripheral from a PIC32. He shows how much latency his conventional interrupt handlers were taking away from his main task. He needed something more efficient. So he created the SPI channels using DMA. He also made a video (see below) with a very clear explanation about why he did it and shows oscilloscope traces about how it all works.

Although the project is specific to the PIC32, the discussion about DMA applies to any computer with direct memory access. The only thing missing is the code. However, there are plenty of examples on the web you can look at, including a Microchip webinar.

Continue reading “PIC32 DMA SPI”

Custom Gaming Keypad Developed with PSoC and Fusion 360

There was a time when building something yourself probably meant it didn’t look very much like a commercial product. That’s not always a bad thing. We’ve seen many custom builds that are nearly works of art. We’ve also seen plenty of builds that are–ahem–let’s say were “hacker chic”.

[AlexanderBrevig] decided to take on a project using a PSoC development board he picked up. In particular, he wanted to build a custom game keypad. He prototyped a number of switches with the board and got the firmware working so that the device looks like a USB HID keyboard.

Continue reading “Custom Gaming Keypad Developed with PSoC and Fusion 360”

MicroLisp, Lisp For The AVR

We’ve seen tiny microcontroller-based computers before, but nothing like this. Where the usual AVR + display + serial connection features BASIC, Forth, or another forgotten language from the annals of computer history, this project turns an AVR into a Lisp machine.

The μλ project is the product of several decades of playing with Lisp on the university mainframe, finding a Lisp interpreter for the 6800 in Byte, and writing a few lisp applications using the Macintosh Toolbox. While this experience gave the author a handle on Lisp running on memory-constrained systems, MicroLisp is running on an ATMega328 with 32k of Flash and 2k of RAM.  In that tiny space, this tiny computer can blink a few boards, write to an OLED display, and read a PS/2 keyboard.

The circuit is simple enough to fit on a breadboard, but the real trick here is the firmware. A large subset of Lisp is supported, as is analog and digitalRead, analog and digitalWrite, I2C, SPI, and a serial interface. It’s an amazing piece of work that’s just begging to be slapped together on a piece of perfboard, if only to have a pocket-sized Lisp machine.

Thanks [gir] for the tip.

Overhauling The ESP8266’s Flash Memory Handling

If you’ve ever corrupted a flash memory on a power failure, you’ll be glad to hear that the ESP8266 SDK implements a very secure and almost infallible read/write management for its flash memory. The catch: It’s also very wasteful. For a single memory block of stored data, three memory blocks of physical flash memory are occupied. [Peter Scargill] enlightens us with a better solution.

Continue reading “Overhauling The ESP8266’s Flash Memory Handling”

Wooing A Lady Into Persisting with Persistence… of Vision

As the story goes, years ago [Matt Evans] was wooing the beautiful and talented [Jen]. There were many suitors vying for her hand; he would have to set himself apart. The trouble was, how to convince her that persisting in the relationship was the best and only course? What did he have to offer? Of course many of us know the answer; having wooed our own significant others with the same thing. Incredible and unrepentant nerdiness.

So! He toiled late into the night, his eyes burning with love and from the fumes of solder smoke. For her he would put his wizardry to work. At the wave of a hand would write songs of adoration in the air with nothing but light. The runes of power, all typed out in the proper order, would be held by a ATiny. A CR2032 coin cell provided the magic pixies which would march to its commands, delivering their spark to the LEDs in the right order.

He etched the board, wrote the code, and soldered the components. He encased it in his finest box of crystal clear plastic and black static foam, a gift of the samples department of the Maxim corporation.

Presumably the full moon was high in the air when he presented the box. He took it out and waved it with a flair. Poetry floated there in front of her eyes. It read, “Jen is cool!”. A few years later, they were married.

New Part Day: The ESP32 Has Been Released

A few years ago, a strange little chip showed up on Seeed Studio one day. It was the ESP8266, originally sold as a serial to WiFi adapter. Since then, the microcontroller in this wee WiFi module was discovered, and the ESP8266 has been the breakout module for hundreds of Internet of Thing modules, and other wireless baubles.

The company behind the ESP8266, Espressif, wasn’t sitting on their laurels for the last few years. They’ve been working on a followup to the ESP8266. It’s the ESP32, and it’s faster, has more peripherals, better WiFi, and Bluetooth LE. Since Christmas, we’ve been ogling this chip. Now, it’s finally out. You can buy an ESP32 right now. Consider the ESP32 released.

Almost exactly two years ago, the forerunner of the ESP32 was released, allowing anyone to blink a LED from the Internet for five dollars. There was a catch with the release of the ESP8266, and that was documentation. Documentation in English did not exist, and it took Espressif a while to realize the hit they had on their hands. Even now, with a proper English datasheet from Espressif, we don’t know if the ESP8266 has 5V tolerant pins. Documentation was an issue for the ESP8266, but it didn’t really matter because someone on the Internet figured it out.

History doesn’t repeat itself, but it is the franchise with the most reboots. There’s some documentation for the ESP32, but it’s far from complete. There’s a CAN bus peripheral in the ESP32, but no one knows what pins it’s attached to. There are some secrets hidden away, but no one is at liberty to discuss them. No one outside Espressif has any idea if the specs are real. This will, of course, change in the next month or so, but only due to the tireless work of electronics enthusiasts the world over.

Right now, there are several listings on the usual online outlets including Espressif’s Taobao shop and Seeed Studio offering either bare ESP32 chips or modules based on this WiFi Bluetooth wonder. These modules include the ESP-Wroom-32 (PDF) that is seemingly based on the ESP31 test modules released late last year and the ESP3212, a module based on the popular ESP8266-12. There are also bare chips floating about.

As far as any new information regarding the ESP32 is concerned, don’t expect much. It’s released, though, and in a month or so the work of documenting this supposed wonderchip will begin.

Although they’re not available to everyone quite yet, we have two ESP-32 modules in hand, and [Elliot] is currently slogging through installing the toolchain and getting everything working. Watch this space, because we’re going to have an Introduction to the ESP-32 post up shortly.

Talking DIY Z-80 Retrocomputer Complete with Dev Tools

[Scott Baker] wanted to take on a new retrocomputing project. He decided to build an RC2104. Lucky for us, he documented everything along the way. In addition to the main board, [Scott] built bus monitoring and debugging tools, a front panel, a real time clock, an analog to digital converter, and a speech synthesizer.

You can follow along in the 8-part post that includes videos. He started with the basic kit:

  • CPU – The Z80
  • ROM – 27C512 64 KB ROM, selectable in 8KB banks
  • RAM – 62256 32 KB RAM
  • Clock – 7.3728 Mhz crystal that drives a 74HC04 hex inverter (for the CPU and the UART)
  • Serial I/O – MC68B50 UART

In addition, he picked up a digital I/O board.

Continue reading “Talking DIY Z-80 Retrocomputer Complete with Dev Tools”