How to set external clock source in PBP


Closed Thread
Results 1 to 29 of 29

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    TurboLS

    Originally posted by TurboLS
    OK, I wired up the serial port and, using the built-in serial port com tool in MicroStudio, I am able to see information from PORTC.6; however the data (which I thought would be 1s and 0s) is coming out all garbled as weird characters and zeros with square edges.

    I am using the SEROUT2 command:

    SEROUT2 PORTC.6,16780,[adval]

    Also, I have included the modedefs.bas file. Any ideas?
    SEROUT2 PORTC.6,16780,[adval]

    will send out the value of adval.

    what your Terminal program displays is the ASCII representation of adval.

    if you would like to see 1's and 0's try:

    SEROUT2 PORTC.6,16780,bin [BIN10 adval,13,10]

    If you are using only 8bit ADC and adval is Byte size replace BIN10 with BIN8


    if you would like to see the decimal value of adval try:

    SEROUT2 PORTC.6,16780,bin [DEC4 adval,13,10]

    for 8 Bit ADC with adval being byte size replace DEC4 with DEC3

    The ",13,10" simply adds a "Carriage Return" and a "Line Feed" after each line
    Last edited by NavMicroSystems; - 18th February 2005 at 16:50.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. HW PWM not working
    By comwarrior in forum General
    Replies: 5
    Last Post: - 31st July 2009, 17:16
  2. Microcode studio - PIC16F877A Interrupts
    By mcbeasleyjr in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th January 2009, 06:10
  3. Data Out From External Clock
    By Quin in forum Serial
    Replies: 2
    Last Post: - 25th October 2008, 09:11
  4. Wierd sleep issue
    By orca in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th March 2006, 22:06
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

Members who have read this thread : 1

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