SHIFTIN SHIFTOUT timing problem


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: SHIFTIN SHIFTOUT timing problem

    Thanks Brian!
    Yes I noticed that depending upon the PIC there is only one pin marked as CCP2. My guess is that by using HPWM the PIC knows to use this pin and it still must have a hardware definition? MCLK is shown as a comment so it has been confusing to know what to do for the hardware defines. Another thing I did not understand is why use CCP2 and not CCP1?

    For 3.3 v to 5.0 v conversion (bi-directional) a device that does this known as the ADG3304 if this is of value. The device can also be used for other voltage level changes.

    Variations in atmospheric pressure causes the zero reference point (the surface of the water) to change so to maintain accuracy a simple water detector (two transistors) could be used to set the zero reference (surface) point.

    Thanks for answering and hope I have made some small contribution to you and others.

    Ed

  2. #2
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default A little help with understand the code in this post Please

    A little help please.

    high presspwr ' there is no pin defined as presspwr

    temp2 = 1000 - celsius ' there is no variable named temp2

    d[17] = temp2.byte0
    d[18] = temp2.byte1 ' There is no array named d.

    high pgc ' there is no pin defined as pgc

    gosub shutdownmemory ' there is no sub-routine with this name

    gosub lowestpower ' there is no sub-routine with this name either end '

    I do not wish it to stop or end just continue to get int information.

    Thanks, Ed

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: SHIFTIN SHIFTOUT timing problem

    high presspwr ' there is no pin defined as presspwr
    If that is so, then pick one and make it so, some thing like
    Code:
    presspwr var PortA.0
    temp2 = 1000 - celsius ' there is no variable named temp2
    Code:
    temp2 var word 'a byte only holds 0-255

    d[17] = temp2.byte0
    d[18] = temp2.byte1 ' There is no array named d.
    assigns value to 2 bytes in array, set up array,
    Code:
    d var byte[18]

    high pgc ' there is no pin defined as pgc
    again make a pin do this by assigning it to that duty
    Code:
     pgc var PortA.1 ' or some other unused pin
    gosub shutdownmemory ' there is no sub-routine with this name
    Make a sub directory or remove the call to it and send the code elsewhere using
    goto or gosub as appropriate.

    gosub lowestpower ' there is no sub-routine with this name either end '
    I do not wish it to stop or end just continue to get int information.
    same answer as above. this is the disadvantage to using code you did not write, you are forced into the position of clairvoyant as you try to imaging what the programmer envisioned.
    Probably the best argument for chewing through someone else's code is to learn from it, the cost is the frustration of trying to understand it.
    I hope you found something useful in my rant,
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts