Help starting a 876A


Closed Thread
Results 1 to 2 of 2
  1. #1
    Naslund's Avatar
    Naslund Guest

    Default Help starting a 876A

    Hi.

    I’m trying to go from a 628 to an 876A.

    Could someone give me an example of working pbp2 code that makes
    PortA.0-3 output
    PortB.1-5 output
    PortC.0-3 input
    PortC.4-7 output
    All digital.

    I’m trying to set the TRISX but it won’t work.
    Is it some DEFINE that has to be set?
    I liked the simple 628….

    Regards
    David

    I’m using
    Pbp 2.42
    PM assembler 4.04

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Go look at COMPARATORS in the Datasheet (for example look at figure 12-1 to select bits 2-0 of the CMCON Register). Turn them OFF first setting those pins DIGITAL mode.

    The go look at ADC's in your Datasheet (for example the Table associated with bits 3-0 of register ADCON1 as shown in 11-2). Set those to DIGITAL mode too.

    Then go TRISx your Ports.

    It is IMPORTANT that everyone READs THE DATASHEET of their chosen PIC to understand it's internal archetecture before blindly going and attempting to program it. Chances are, that with the more complicated PICs, it just isn't going to work until you understand and turn OFF all the things that might be standing in your way.

Similar Threads

  1. Starting new project - Any ideas/suggestions?
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th February 2010, 16:06
  2. Set the starting time with ds1302 picbasic
    By crisxstyle in forum Off Topic
    Replies: 9
    Last Post: - 30th September 2008, 15:14
  3. 876A startup issue with PortC
    By modifyit in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 3rd April 2007, 14:10
  4. Starting with PIC18F
    By Gérard in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 7th May 2006, 16:40
  5. Starting PC from PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th February 2006, 14:42

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