ASM help


Closed Thread
Results 1 to 17 of 17

Thread: ASM help

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    Thanks a million! While I don't know for sure, I'd guess that your little program is the start of something that will be really useful to all those people who post "how can I receive bytes while....... with my 16Fxxx". Tomorrow, I'll work on the SEND side and the buffering.
    Charles Linquist

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Sure, no problem Charles,

    Quote Originally Posted by Charles Linquis View Post
    Tomorrow, I'll work on the SEND side ...
    Already done ...

    Tmr_tx-18
    http://www.picbasic.co.uk/forum/show...1&postcount=28

    Or, at least it's a good start.
    <br>
    DT

  3. #3
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Charles,

    Just for an additional example and reference, I posted a 9600 baud half-duplex example on PICLIST several years ago that uses Timer 2 and IOC. I also have a full-duplex demo and another half-duplex demo that uses Timer 0 that shows how to reload a free-running 8 bit timer.

    Hope the examples help. Have a great day.

    Regards, Mike

    Code:
    ;******************************************************************
    ;*                                                                *
    ;*  Filename: 12F683 Half-Duplex 9600 Demo.asm                    *
    ;*    Author: Mike McLaren, K8LH   (k8lh_at_arrl.net)             *
    ;*      Date: 02-Jun-05  (last revision 02-Dec-05)                *
    ;*                                                                *
    ;*   Half Duplex Bit-Banged 9600 Baud Serial I/O Demo             *
    ;*   (with 16-byte circular receive character buffer)             *
    ;*                                                                *
    ;*  ·Uses 12F683 INTOSC running at 8-MHz                          *
    ;*  ·Bit rate error 0.16% plus or minus 1.0% for INTOSC           *
    ;*  ·Bit-banged 9600 baud serial I/O                              *
    ;*    ·Half Duplex (should not TX and RX simultaneously)          *
    ;*    ·TMR2 interrupts at 104-usec intervals (every 208           *
    ;*     instruction cycles) and IOC (interrupt on change)          *
    ;*     for RX start bit leading edge detection on RXPIN           *
    ;*    ·Circular 16-byte RX character buffer                       *
    ;*    ·Inverted TX and RX signals (MAX232A or similar             *
    ;*     inverting RS-232 interface required)                       *
    ;*  ·Relatively small - the ISR and the support routines          *
    ;*   Init232, Put232, and Get232 use 102 words of code            *
    ;*   space at locations 0004 through 0069                         *
    ;*  ·Worst case 23% ISR 'overhead' (24-usecs) when a              *
    ;*   complete RX character is added to the circular               *
    ;*   buffer once every 1.04-msecs while receiving                 *
    ;*                                                                *
    ;*     MPLab: 7.21    (tabs=8)                                    *
    ;*     MPAsm: 4.02                                                *
    ;*                                                                *
    ;******************************************************************

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    That is by far, the smallest program I've ever seen.
    <br>
    DT

  5. #5
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Yeah, that didn't quite work out right Darrel (LOL). I'll go back and add the file...

    Regards, Mike

    Oops! Too late. I'll add it here (below). Sorry Gentlemen.
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Mike, K8LH; - 19th October 2009 at 03:35.

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Thanks Mike,

    I thought that I was the first guy who dreamed up (what I think is) a relatively elegant way to save processor cycles. I should have known better!
    Charles Linquist

  7. #7
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    Thanks Mike,

    I thought that I was the first guy who dreamed up (what I think is) a relatively elegant way to save processor cycles. I should have known better!
    You're welcome Sir. And btw, just about everything I ever ended up patting myself on the back for inventing seems to have been done before too (LOL)...

    Regards, Mike

Similar Threads

  1. PBP, ASM and LST files
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2010, 13:43
  2. ASM or PBP First?
    By mackrackit in forum Off Topic
    Replies: 4
    Last Post: - 10th October 2009, 12:08
  3. Serial Output - for an ASM numb
    By scomi85 in forum Serial
    Replies: 0
    Last Post: - 1st March 2009, 10:13
  4. Problem using ASM instruction
    By ewandeur in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd April 2008, 15:26
  5. Can an asm interrupt contain gosub to a picbasic routine?
    By sougata in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 21st April 2005, 19:49

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