16F1828 SEROUT2 works badly, but works fine on 16F886 on same hardware


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: 16F1828 SEROUT2 works badly, but works fine on 16F886 on same hardware

    Here is better explanation - the top row shows how data should look, and bottom row shows what actually is delivered.
    It looks like for each 32 bytes, 1st bit has it's value increased by 8.

    Very strange.

    Code:
    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    00 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
    
    
    10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
    00 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
    
    
    20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
    90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
    
    
    30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
    90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
    Last edited by CuriousOne; - 21st March 2023 at 19:18.

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


    Did you find this post helpful? Yes | No

    Default Re: 16F1828 SEROUT2 works badly, but works fine on 16F886 on same hardware

    I did a bruteforce approach - sumbitted variable changing from 1 to 65535 to SEROUT2 mode selection, sent fixed set of bytes and watched serial port for them to appear in proper order. 89 worked well. Strange, why for 886F 84 is fine but here we need 89.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: 16F1828 SEROUT2 works badly, but works fine on 16F886 on same hardware

    89 was for FTDI chip.
    For CH340 it needs 92.
    Very strange, why this is happening...

  4. #4
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: 16F1828 SEROUT2 works badly, but works fine on 16F886 on same hardware

    Send a capital 'U' ($55) and measure the bit timing. 9600 baud should be 104us/bit.

Similar Threads

  1. My "Library" for ST7920 Graphical displays, works fine, but...
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 19th July 2022, 19:53
  2. 12C fails on first attempt, then works fine...
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th January 2018, 17:56
  3. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  4. 7805 works fine, LM2940CT5 not!
    By DanPBP in forum Off Topic
    Replies: 4
    Last Post: - 29th August 2007, 22:01
  5. ERROR Compling 16F819...l but the 16F818 works fine
    By 4Lewis in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st April 2006, 06:47

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