Has it been a year already?
I've used the little spare time I have to work on this project. I guess the scope of this project is huge.
I decided to go from the rp2040 to a more power efficient MCU and I went with the NXP LPC845. This required a lot of programming to get going.
So there is a rust HAL for the NXP LPC845 but it was missing alot of features I needed. So I thought I would just make a hack with the PAC to get going but then ended up implementing full IOCON and DAC support. I also added DMA support for the DACs.
I still have to fork the original HAL on github and upload my code. I however did break the LPC82x support when adding some of the features. This requires some code changes since both the LPC 8xx and LPC 82x features are different. Since I don't have a LPC 82x devboard I can't really test if my changes work at all.
Feature flags are used to seperate the two MCU types since they are a bit different in how they work, however there were so many different feature flags for the 82x series and there is no feature flag it's for the LPC 845.. so very messy if you want to add support for the LPC 804 for example. I started rewriting this so each LPC 800 series MCU could be added in an easy way to share what code that can be shared but I wanted to advance the project instead. If I only had a bit more free time...
Using the RP2040 I used an external DAC to play the simulated DTMF button tones, dial tone and so on. I made the DTMF tones LUTs using a python script and put them in the flash.
Switching to the LPC845 I decided to use both DACs instead to output the different tones and then mix them together using a summing amplifier to form the DTMF sounds.
Since I started over with a new MCU, I just made a new project and used RTIC 2 which turned out to make things so much easier.
Going from using a I2C DAC with a complicated hacked together HS I2C interface running in a PIO in the rp2040, a SPI DAC with it's pops and clicks problem and now using inbuilt DACs of the LPC845 to do it instead.
The tones sounds great without pops or clicks.
It's not perfect yet since there is an issue where sometimes only one of the tones are played when a key is pressed, it happens randomly.
It might be power related since everything is powered from the LPC845-BRK 3.3 Volt LDO. I need to add external power to the GreenPAK and amplifiers to see if the problem disappears. If it's still there then I guess I have to do some debugging.
I've started making the schematics for the project as going on from here involves a lot more advanced components and a new diavox mainboard PCB.
I'll try to do a weekly log from now on.
Anders Helgesson
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.