Recommended Posts

thing is, the pic is already programmed.  i am trying to interface into it without modifying its program.


i just don't know if its possible to run zpuino and generate a 4MHz clock with zpuino at the same time.


heck i dont even know if its possible to *accurately* generate a 4MHz clock with zpuino by itself.


i would think not, but i figure it doesnt hurt to ask.


i will most likely wait for my caps/xtal to come in the mail in a few days and do it that way, but was hoping for

an all in one solution.  short of adding in a 2nd pic just for clock which would be kind of dumb :)

Link to comment
Share on other sites



the best way to generate the 4MHz clock is to program the 16-bit timer w/o prescaler to provide a 50% duty cycle PWM.


From top of my head, set the CMP to 23 ((96000000/4000000)-1), and set the CMPLOW of the relevant PWM output to 0, and CMPHIGH to 12.


I can write a simple sketch that does this for you later today, if you are kind enough to tell me to which FPGA pin you'll be expecting the clock output.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.