Electronic – PIC24f Get Clock Signal for external Device

digital-communicationsmicrochippic

I have an external memory device with pin configuration:

  1. Data Input
  2. Data Output
  3. Connection
  4. System CLock
  5. DC 24V
  6. Ground

Here is the link

I need to design a code to communicate with this device.

I am having Explorer-16 Starter kit with PIC24FJ128GA010 microcontroller. So, I was trying to setup a test environment to check the module before proceeding with the final design.

But I am stuck with few points. Might be lacking concept.

  1. My first requirement is to provide a System Clock Signal to the device. Please suggest me the best possible way to get/generate clock signal for the device?

  2. Secondly, as per the memory device instruction, to start communication, Send Start/Stop cmd while clock signal is stable in the high state? How can I achieve this?

I am badly stuck with these two points. Please provide me a better solution. I am starting microcontroller after very long time. So need to brush up. Please help me with any addtional information.

Best Answer

You didn't provide any identifying information about the memory device you're using, so I can only answer in generalities.

  1. A clock signal is typically just a square wave at some frequency. Generally, a 50% duty cycle works for most systems, but there are some systems that have unique duty cycle requirements that must be met. A square wave can be generated many different ways. I'm not familiar with the Explorer-16 Starter kit, but I presume it has at least one PWM output channel. PWM stands for Pulse Width Modulation, which is just a fancy term for a square wave with a programmable frequency and duty cycle. You could also just bit-bang a digital output pin high and low. If you're designing your own circuit, there are components called oscillators that are precision tuned to output a square wave at a set frequency.

The most important thing, however, is to understand what the memory device requires. The voltage level, frequency, and duty cycle of the system clock must be specified by the device. That information can only come from the manufacturer in the form of a datasheet or something similar.

  1. The answer to this question is similar to #1. Only the manufacturer of the memory device can answer that question. There is no universal definition of what a "Start" or "Stop" command is. Is it SPI? Is it UART? Is it a proprietary serial protocol? Only the datasheet will have that information.

If you update your question to include which external memory device you're using, you're more likely to get a more specific answer.