1 of 1 people found this helpful
My condolences on the passing of your developer.
Questions: Besides the .hex file are there any other files your developer provided such as a .map or .elf file?
Other files useful to potentially is a .rpt file. This file describes the configuration of digital and analog resources being used.
To your question:
The short Answer
Although all the raw information on how to configure and program the PSoC is there in the hex file, it is basically impractical to reverse-engineer.
The Long Answer
If the project design was incredibly simple, decoding the hex file is attainable. As the design gets more complex, it becomes exponentially more difficult.
In either case, the best you could possibly decode is what register settings occur in the configuration phase and you might be able to convert the FLASH bytes back to raw assembly code.
My suggestion is that if the design has any complexity, it might be best to start from scratch.
The cypress chip is essentially being used as a frequency sweep generator. It really shouldn’t need to be that complex. Although I am tending to agree that it may just be better to start from scratch.
Thank-you for your time and quick response.
You can find several frequency sweep generator demos along with DDS components (DDS23, DDS32) here:
/odissey1's solution hopefully will do the trick.
If not, can you provide any information (specs, drawings, etc) of the design goals and intentions. With this information, we might be able to provide the "best" wisdom from the experts who frequent the forum.
You also mentioned modifications needed. You might want to include that in the information.
The project “unit” is designed to create biometric frequencies used in EMF therapies. Essentially the user selects from range of frequencies the output that he wants, then the cypress using a “WaveDAC8” or similar “device” outputs said frequency along pin # x,y,z.. So that each individual pin has its own assigned frequency. I will have some diagrams finished by EOD.
I must say I have enjoyed playing with the Cypress chips, and if I knew the community was this strong I would have been using them a lot more, rest assured I will be now.
We are presently using cypress chips on multiple projects, this is the first project where we are utilizing a KIT..
I think /odissey1's solution creates sine waves. I could be wrong. I've never used it. UPDATE: /odissey1's DDS component can create many wave types including arbitrary.
Here's a list of questions that might help stimulate solutions within the PSoC:
- What type of waves (of varying frequencies) do you need? Sine, triangle, square, user defined (arbitary-style)?
- What is the min and max frequencies you need to support?
- What is the frequency step needed? Ie. 1 Hz step between frequencies.
- Is there a feedback signal needed to tune the output frequencies?
Here are some questions regarding elements external to the PSoC:
- What is the output voltage and current requirements of each (x, y and z) stimulus terminal?
- Is there a external display that needs to be interfaced to control or view the output status? Are you using a terminal interface?
- Is there a schematic available that you can share to show the circuits external to the PSoC?
I counted 7x of 555 timers and one 4046 PLL (likely used as VCO). You can make our task simpler if described what kind of waveform (shape, amplitude, Frequency, etc.) and on which pin (KIT-059) are needed.
Overall, it seems that project has originally been implemented using discreet parts, and PSoC5 (KIT-059) was added to the design later. I believe that parts count could've been reduced by 80% if it was done inside PSoC.
I completely agree.
Waveform on this particular device is sine wave only. The frequency is user selectable via toggle switches. (I will get you a breakdown of which freq. to which pin). Amplitude is controlled via a potentiometer allowing for user selectability.
I'm assuming you've got a working PCB that is comprised of the schematic pages you sent earlier. Therefore, the scope of this assistance at a minimum is to help you recreate the internal configuration and programming of the KIT-059 board. This can provide the reference point of a equivalent design to what you currently have. Further mods are a subject for another day.
I've reviewed your schematic pages. As indicated, I'm limiting my scope to those circuits relevant to KIT-059 board. Can you clarify some of my questions or assumptions in the table below:
KIT-059 pins IO direction Comment P2.7 input/output Is this an input or output? What is the intent of this signal? P2.6 input/output Is this an input or output? What is the intent of this signal? P2.5 input/output Is this an input or output? What is the intent of this signal? P2.4 input/output Is this an input or output? What is the intent of this signal? P2.3 input/output Is this an input or output? What is the intent of this signal? P2.0 input/output Is this an input or output? What is the intent of this signal? P1.6 output What is the intent of this output? P12.1 output What is the intent of this output? P15.1 input External 24MHz crystal input P0.1 input There is mention of a signal "0.1" but there does not appear to be a connection on the Cypress Module Schematic page.
I noticed you also include a PSoC1 in the design.
Yes everything works seamlessly. We have a client that now wants to simply add a couple of frequency outputs. If I had the original project/workspace files this would be a much simpler process. Further mods though intriguing at the very least, are as you said the priority at this time.
I will have all of your answers to you ASAP.
We are glad that you are making progress in your project. We highly recommend you to start a new discussion by creating a new thread so that other community members might be benefited from your questions.