My project is starting


Closed Thread
Results 1 to 40 of 92

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    I think I just found the problem. I left too much up for granted. Being new to this chip, I never dreamed it would default to a 500K clock!

    BTW, I am running intosc (apperantly at 500K, not 4M like I assumed) So I will set osccon to be 4M and see what happens

    EDIT: How fantastic life is when you tend to the little things. now works as it should. Off to do more fun stuff
    Last edited by cncmachineguy; - 20th November 2010 at 20:35.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    New question
    Heres a snipit:
    Code:
    ' Configure pins for digital operation (uncomment as needed).
    ' These settings are intended as simple examples.  For more detail,
    ' see the appropriate device datasheet for register descriptions.
    'ANSEL =  %00000000  ' 16F88, 16F688, 16F690, 16F88x
    'ANSELH = %00000000  ' 16F690, 16F88x
    'ADCON1 = %00000111  ' 16F87x, 16F87xA, 18F452
    'ADCON1 = %00001111  ' 18F4620
    Why when I uncomment the ANSELH line, I get a syntax error for that line? How should I be setting it?
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Well I don't get it, but after changing nothing, it works. go figure
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Looks like, but I have not used this chip, that the ANSEL has changed some.
    ANSELA
    ANSELE
    ANSELF
    ANSELG


    ANSELA = %00000000
    ANSELE = %00000000
    ANSELF = %00000000
    ANSELG = %00000000

    Maybe...
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Just feeling a little silly

    Well I broke my own rule of troubleshooting- NEVER change more then 1 thing at a time!! While I was trying to figure it out, I must have kept changing "define osc 4" to "define osc = 4". Playing with caps back and forth. I was relocating where I had the statement and not noticing I kept adding the = sign.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  6. #6
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    new question, or looking for suggestions.
    I am gonna run my pic at max speed for it. thats 32 meg. The way I was going to handle my step/dir signals was to just pass them through to my drives. So my main would look something like this:
    Code:
    Main
     portc = porta ' pass all values to C
     if porte!=0 then LimitHit 'check for overtravels
     goto main
    Thats my whole main section. Now for my problem

    If I want my interface card to look and act like a Gecko drive, their timing is this: step signal requires a min low of .5microsec and a high of 4 microsec. It occurs to me the .5uS will be 4 instructions running at 32meg so I think I could miss that pulse real easy. In fact I may miss many.

    Now there are some other thing going on here, 1 I don't think EMC is updating the port that fast, and 2 I can make the pulses longer. The one thing I can't do is IOC cuz the boards made already so wrong port.

    I guess I am just looking for other opinions here as to how to handle this. BTW, If i hit a limit, I don't care if I miss steps at that point.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    If it is any help..
    My setup has the step drive set to 5000 ns. "nano"
    Dave
    Always wear safety glasses while programming.

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