A Defines Request


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Feb 2011
    Posts
    19

    Default A Defines Request

    The attached program, prototype photo, and schematic appear to work with a Stamp. How can I get it to work on my PIC18F4550 for more speed? Thank you.
    Attached Images Attached Images   
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default Re: A Defines Request

    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Feb 2011
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: A Defines Request

    Actually, the data sheet (book) is not real handy in either .pdf or paper form. It is not object oriented, educational, or structurally organized. Because of my past work hiring people overseas, I bet it was written in the Orient then translated to English by an English major (word for word) instead of a programmer / educator who would organize it and provide clear explinations.

    Maybe you could make some money selling a book that is actually handy. Please give it a try. I wrote a book last summer in about 2 weeks of writing 10 hours a day, followed by 2 months of less intense work perfecting it. It didn't sell well but one advantage is that much concentration got a lot of original ideas on paper and new ideas keep coming.

    http://www.picbasic.co.uk/forum/show...392#post100392
    > Post your specific problem (along with your code and stuff) and we will be glad to help.

    Still waiting for that help. Not that it wasn't fun spending half a day drawing, photographing, copying, and posting according to your request.

    Until you decide to provide some real help as you wrote you'd gladly do, I'll have to proceed with my current project on a Stamp which is programmed in Basic only. BTW, who do I address suggestions for improving PIC Basic Pro to?

    Any suggestions for a forum to recruit a low-cost PIC consultant? Many of the low cost people are harder to find.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: A Defines Request

    Hi Kirk,
    All you've really said is that your circuit and/or code doesn't work. That's not a lot for anyone to work with. What exactly doesn't work, do you have power? Does the PIC run at all?

    Hardware wise you don't seem to have any decoupling caps across the powersupply pins on the PIC. You have 5V and ground connected to pins 11 and 12 but not to 31 and 32 - there's two things to check.

    Software wise mackrackit did provide you with one possible (and likely) cause for it not working as you might expect. Several pins are multiplexed between peripheral inside the PIC, like ADC and comparators. You have stuff connected to PortA and the link given in the previous post explains a lot of details about that - if you haven't read it I suggest you do so.

    If it still doesn't work, try verifying that the PIC runs. Blink a LED to begin with, work your way up from there.

    With more capable devices, such as the 4550 compared to the BasicStamp, there's also more things that needs to be setup properly in order to work properly, that's just the way it is.

    Regarding the datasheet I personally think that Microchip produces one of, if not the the best datasheets I've seen. Yes, it's several hundred pages but that's what it takes to cover a device like this.

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


    Did you find this post helpful? Yes | No

    Default Re: A Defines Request

    Ok, so you are new to gleaning info from a data sheet. They can be overwhelming at times. But things like connecting power should be pretty straight forward. That is why I mentioned the data sheet.

    Code:
    ADCON1 = 15               ' Set all I/Os to Digital      
    CMCON = 7                 ' Disable Comparators
    Is what you will need to add near the beginning of your code.

    BTW, who do I address suggestions for improving PIC Basic Pro to?
    It is obvious you are new to PBP so how can you say it needs improvement?
    Dave
    Always wear safety glasses while programming.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: A Defines Request

    Tris Registers?

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