Can PBP & 16f88 really do 9600,8,E,1


Closed Thread
Results 1 to 39 of 39

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Thanks Dave.

    I was using logical operators instead of maths ones!!!

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by retepsnikrep View Post
    I was using logical operators instead of maths ones!!!
    Yeah - that's one area where various implementations of Basic vary widely - you need to study the documentation, ask lots of questions and take note of examples posted here as well as those on meLabs web site.

    For example, the syntax for bit arrays is rather obscure. AFAIK it's only documented in an example in the Repeat/Until explanation in the manual. I'm not sure I would have ever grasped it without an example posted by Melanie.

  3. #3


    Did you find this post helpful? Yes | No

    Default Ring Buffer

    Thanks to the members on here my project has been working well for over a year.
    But now I need to enhance it and move to using a ring buffer to receive the incomming data and
    some sort of interrupt driven routine as i need more time for code execution and can't afford to wait
    for the data.

    So I need to work directly with the USART hardware and use darell's interrupts.
    I have been reading up on here but i'm pretty confused.

    So if i explain what is happening then perhaps members can chip in with some more advice.

    My application (16F88 chip running at 8mhz) has to receive data on a 9600, 8,E,1 in 12 byte packets on the USART RX Line,manipulate the data if reqd and then squirt if back out of the USART TX port on a different Line in same format.
    I have no control over the incomming data and the packets have about 15ms between them.
    The bytes in the packets are back to back no gaps.

    I have been receiving the packets using hserin and then squrting them back out via hserout, but this
    only leaves a couple of ms before next packet is arriving. No time to do anything especially when
    i am trying to use the debug command on another pin to send some data to an LCD.

    I can't really afford to drop packets so any advice appreciated.

    I understand the USART has a two byte RX/TX buffer. Can it RX & TX at the same time?

    Any simple examples of a ring buffer doing USART RX and TX as described?

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Using a 20MHz clock would give you a few more clock cycles (i.e. more statements can be executed in the same amount of time) between input & output. Other than that, you'd probably need a bit of ASM optimization to make significant gains.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP migration from 16F88 to 16F1827
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st June 2010, 18:14
  3. PBP, ASM and LST files
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2010, 13:43
  4. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  5. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

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