Is it possible to interpret non-standard serial data with PicBasic (sample attached)


Closed Thread
Results 1 to 40 of 61

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Post Re: Is it possible to interpret non-standard serial data with PicBasic (sample attach

    Name:  Untitled.jpg
Views: 677
Size:  50.3 KB
    as close as I can get . it has a glitch after the last bit sent

    Code:
    '****************************************************************
    '*  Name    : MODULATOR.BAS                                     *
    '*  Author  : [select VIEW...EDITOR OPTIONS]                    *
    '*  Notice  : Copyright (c) 2016 [select VIEW...EDITOR OPTIONS] *
    '*          : All Rights Reserved                               *
    '*  Date    : 5/29/2016                                         *
    '*  Version : 1.0                                               *
    '*  Notes   :                        *
    '*          : 16F1825                                           *
    '****************************************************************
      #CONFIG
                 __config        _CONFIG1,    _FOSC_INTOSC & _CP_OFF & _WDTE_ON  &  _PWRTE_ON  &  _MCLRE_ON  & _CLKOUTEN_OFF
                  __config      _CONFIG2, _PLLEN_OFF & _LVP_OFF            
    #ENDCONFIG
     
    OSCCON=$70 
    DEFINE OSC 8
     
    '                       PIC 16F1825
     
    TRISA     = %011111    ' 
    trisc     = %001111  ; 
    ANSELA=0     
    ANSELC=0
    MDSRC=    %00000000
    MDCARH   =%01000100
    MDCARL   =%00000000
    X VAR byte
    darta   VAR byte[4] 
    TIMER1     VAR WORD EXT
    clear
    modout var latc.4
    darta.0[14]=1 
    darta.0[15]=1  
    t2con=6
    pr2=158
    CCPR1L =318>>2
    ccp1con=12
    MDCON.0 = 0
    modout =1
    Main_Loop:
    lata.5=1 ; cro trigger
    while !pir1.1 :wend
    modout=0
    pauseus 9900
    modout =1
    pir1.1=0
    while !pir1.1 :wend
    pir1.1=0
    while !pir1.1 :wend
    MDCON=    %11000001
    pir1.1=0
    while !pir1.1 :wend
    for x = 0 to 31  
    if  darta.0[x]  then
    MDCON.0 = 0
    pir1.1=0
    while !pir1.1 :wend
    pir1.1=0
    while !pir1.1 :wend
    MDCON.0 = 1
    pir1.1=0
    while !pir1.1 :wend
    else
    MDCON.0 = 1
    pir1.1=0
    while !pir1.1  :wend
    endif
    next 
    modout = 1
    MDCON = 0
    
    lata.5=0
    PAUSE 200 
    goto Main_Loop
    end
    Warning I'm not a teacher

  2. #2
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: Is it possible to interpret non-standard serial data with PicBasic (sample attach

    Thanks!

    I guess, your code can run on 16F1829 ?

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: Is it possible to interpret non-standard serial data with PicBasic (sample attach

    I guess, your code can run on 16F1829 ?
    should do they are the same except for a few extra pins
    Warning I'm not a teacher

Similar Threads

  1. Is there an ICSP pinout standard???
    By OldMarty in forum General
    Replies: 12
    Last Post: - 21st September 2016, 12:29
  2. Interpret to Picbasic Code ¿?!!
    By Denner in forum PBP3
    Replies: 3
    Last Post: - 9th June 2015, 18:00
  3. sample code for AT45DB642D in Picbasic Pro
    By itsssyam in forum General
    Replies: 0
    Last Post: - 10th March 2010, 06:01
  4. Max/232 Bootloader problems - Schematic attached...
    By rossfree in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 4th May 2007, 15:54
  5. Replies: 0
    Last Post: - 30th November 2004, 02:18

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