Generating MCP2515 SPI ‘READ’ Operation Request Using PSoC 42xx

PSoC 42xx provides SPI component that supports up to 4MHz clock speed. Communicating with MCP2515 via this component, however, is not straightforward when you try the highest clock speed. The problem is concept of 'operation' of MCP2515. An operation consists of multiple SPI bytes bundled by 'enable' signal on the CS pin. Lowering the CS pin initiates an operation and it must stay low during the data transmission. See following timing chart quoted from the MCP2515 datasheet. The PSoC SPI component lacks direct control on the CS pin signal. The component automatically lowers the CS level when the write API puts a byte to Tx FIFO and the component's internal…

Module Descriptor and Compiled Parameter Table

I tried Google Protocol Buffers to describe and transfer modules' schema before. This approach, however, did not work well because it required large amount of resources both in program and in RAM spaces of a PSoC processor. It limited available resources for module functionality. I finally gave up the approach. I am trying another approach to describe a module using JSON and to compile it into a parameter table implemented using C macros. The module program does not have to include the schema. Sharing the JSON schema file by Analog 3 modules is good enough. It is nice if the module has the schema internally though. Google Protocol Buffer may…

How to swap control-m and control-j in Emacs

Emacs often changes the behavior suddenly and drastically. Recent surprise to me was that role of ctrl-j (newline and indent) and ctrl-m (newline) switched out of the blue. I don't understand the developer's sense of changing user interface of a multi-decade years old software. But luckily, emacs has very powerful customization ability. Adding this line reverts the key bindings back. (when (fboundp 'electric-indent-mode) (electric-indent-mode -1)) I appreciate this post http://emacs.stackexchange.com/questions/5939/how-to-disable-auto-indentation-of-new-lines

USB Serial Communication with PSoC Pioneer Kit

Exchanging data with PSoC Pioneer Kit over serial communication is often useful. The kit CY8CKIT-042 has a built in USB-to-UART utility programmed in the PSoC 6LP device which is used for onboard debugger for the target PSoC 4. It is easy to use. See below. https://www.element14.com/community/thread/23868/l/psoc-4-pioneer-kit-community-project04-usb-uart-utility?displayFullThread=true

Installed Necessary Applications

I like OS X as a software development platform (and electronic stationery); On the other hand, it's much better to use Windows for hardware development because of better coverage of development tools. As a compromise, I own MacBook and runs Windows under Parallels Desktop for hardware development. I have no issues with this style so far thanks to the powerful USB support by Parallels. My Windows platform has reached disk size full at 64GB. I decided to extend the disk size and re-install everything. Here are highlights of my Windows platform: Windows 10, display language = English PSoC creator 3.2 for the PSoC development platform. 3.3 is installed by I…

MIDI Receiver Module

My PSoC Creator application became unstable suddenly. I could not work on software today. I'm now recovering the software. Meanwhile, I made a MIDI receiver module instead. Developing and debugging MIDI Rx would be easier and less troublesome hopefully. Not yet verified the behavior.

Analog2.0 is restored, started making Volume Control Module

I restored the Analog2.0 set successfully. It's working fine now. The Volume Control Module substitutes existing VCA and envelope generator. EG part will generate linear volume control voltage for analog VCA. I will reuse VCA in Analog2.0 for analog part.

Analog3: The First Use Case

One year has passed since I stopped working on Analog 3. Now it's time to resume the development. The picture above is the first use case of Analog 3. This is a draft panel layout of the synth I want to make. The panel includes least set of parameters I want. Many parameters on this panel has non-traditional style, like ones in VCA. I will need to revise and adjust such parameters. In order to avoid remaking hardware modules, I will control the risk by following approach: Develop the synth by modifying a working complete set of synthesizer, i.e., the base platform. I will use the Analog2.0 fundamental set for…

exp() calculation for micro processors

You frequently encounter a situation that exponential function is necessary when you work on a musical instrument project using micro processors.  Its generic implementation is slow and space consuming, so is not suitable for micro processors.  So I need to do some alternative implementations.  For those implementations, space and speed is important but accuracy may be sacrificed in many cases. Follows are articles about fast and compact exp() implementations, for my future reference. http://www.convict.lu/Jeunes/ultimate_stuff/exp_ln_2.htm http://www.quinapalus.com/efunc.html I'm currently using a table lookup approach that I implemented before for an envelope generator I prototyped before.指 This one is still a little slow and large, but it's running in PSoC 4200 without major…