As a brief reprieve from my main CPC2 project, I sidetracked into Arduino programming to solve a problem on the CPC2. I need to create an interface to a memory card, with only two wires. To do this, I’m going to use an Atmel (Microchip) ATtiny841 to interface between the memory card SPI interface and a two-wire serial UART. To program this device without spending heaps of money on a dedicated programmer, I’ll use an Arduino to program the Tiny. This post covers setting up an Arduino to write a bootloader into another Arduino or Atmel chip. To test this process, I used an Freetronics EtherTen to program a Freetronics Eleven that had a damaged bootloader. I’m using version 1.8.5 of the Arduino IDE.
I’ll start with a confession. While I’ve had some success with FPGAs, I managed this despite not understanding some of the basics, such as system design constraints, particularly in Quartus. This post covers both my research into system design/timing constraints and the result of the byte cache that sits on top of the SDRAM controller. I’ll break with my tradition and save the screen grab for the end.
Cache (Screen) Grab (Click for large)
This screen grab shows one of the key process steps in the caching controller, the cache line replacement. The red bracket indicates the cache i/o ports and some key internal state variables, and the blue bracket indicates the data cache i/o ports on the dual-port ram. Continue reading
How time flies – it’s been a month since I posted. I’ve been waiting for the PCBs ordered from OSH Park to arrive. They were tracked all the way from the US to my local post office, and somehow Australia Post managed to lose them 😦 The helpful people at OSH Park didn’t hesitate, they put through another copy of my board on the next production run at no cost to me. They’re on their way already – thank you, OSH Park! I can’t rate these guys highly enough!
So, let’s start with the obligatory graphic:
I was planning to write up my next big gamble with the CPC2 build; double sided reflow boards. However, someone has done it for me!
With the addition of new components to my CPC2 design it’s starting to look very cramped if I want to keep the small form factor (the dongle part of my CPC2 dongle).
This is usually solved by putting some of the more flexible components, such as passive capacitors and resistors on the bottom of the board. I’d normally do this manually with a hot air pencil. But with the very large number of bypass capacitors that I’ve added to my latest design, hand assembly is not my preferred option, although still possible.
Instead I’m going to try to follow the lead of some of the PCB forums contributors, and bake both sides of the board.
The results seems mixed when both sides are baked using normal leaded solder paste. Usually it works, but sometimes not. However, it seems universally accepted that using lead-free solder on the bottom of the board and leaded solder on the top seems to be successful.
The higher melting point of the lead-free solder will ensure the components on the bottom of the board won’t drop off during the bake of the top side.
Additionally the bottom side of the board is a few degrees cooler than the top side as it’s facing away from the infra-red elements in the oven.
There’s a couple of things I need to do to ensure that this method is viable:
- Place only high-temperature components on the bottom of the board, so no clocks or precision resisistors
- Place only low-mass devices on the bottom. The solder has a good surface tension when reflowed, but adding a heavy, 20mm high-bright LED might overcome the surface tension.
- No precision placed components. While I don’t expect the components will drop off, there will be some semi-liquid solder on the bottom side at the peak reflow temperature, and it’s quite possible they will jiggle during the second bake. An eMMC chip has 0.5mm pitch balls, so there’s no room for any jiggling.
So, that’s my plan. I’ve finished the update of the CPC2 schematic, and I’m laying out the board now. I expect I’ll be done in a few days, then a week of testing and I’ll send the gerbers to my favourite fab OSH Park.
Yes, it’s another shameless plug for a company that enables my hobby! Please support them by sending them your boards for fabrication so that I can keep sending them mine! You’ll also note in the linked Instructibles above, they also use both OSH Park and OSH Stencils. Coincidence….?
Stay tuned for the results in a few weeks.
After a two month absence, I can reveal that the CPC2 has another component almost ready for prime time. The past few weeks have been spent writing the Verilog RTL code for the uPD765 floppy disk controller, from scratch. It was one of the more interesting and sophisticated functions that I’ve written. Take a look at this “proof of life”:
Mad props to antepher and his awesome techtutorialsx blog. Just when I’d given up hope that the ESP32 would resolve my Bluetooth woes, he points out that BTStack is a pretty capable stack for embedded and has a port for the ESP32 already! I’m eternally grateful…thank you! More to come, but I may be able to get the ESP32+BTStack to connect to my Bluetooth HID devices for CPC2…
The objective of this ESP32 tutorial is to explain how to get started with the Bluetooth functionalities that are supported by the ESP32 hardware. The Bluetooth tests of this tutorial were performed using a DFRobot’s ESP-WROOM-32 module, integrated in a ESP32 FireBeetle board.
View original post 1,473 more words
Lab Power, Timing issues, Dodgy eBay Vendors, ESP32 and Sound!
This is a multipart post to get some of the project activities over the past couple of weeks documented. Let’s start with “Lab Power!”
Following the last post, I connected the USB packet information to the faked keyboard in the FPGA and managed to get this.
There’s a timing issue that I suspect is interrupt related. The key repeat is extremely slow, and this is mainly driven from the 50Hz interrupt line. I faked this signal, so there’s obviously some work to do there! Stay tuned!