Questions/Basic/16F628A


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    One, more thing....How many bytes are in a word for this particular mcu. Since it's an 8bit mcu, its two bytes right?

  2. #2
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    tap tap tap... is this thing on? One more thing. Does anyone have any experience or code to share on how to convert a floating point number in basic? The output of the Vector compass is in IEEE 754 format, so I assume I have to convert this to a usable format in basic.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I've never used it so I can say how it works but there is code on ME Lebs website for performing floating point. I stay away from FP just for headache sake.

    And yes there are 2 bytes to a word.

    Bit is a Bit
    Byte is 8 Bits
    Word if 2 Bytes or 16 Bits

  4. #4
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by CocaColaKid
    I've never used it so I can say how it works but there is code on ME Lebs website for performing floating point. I stay away from FP just for headache sake.

    And yes there are 2 bytes to a word.

    Bit is a Bit
    Byte is 8 Bits
    Word if 2 Bytes or 16 Bits
    Yep came across that code. I will be picking it apart this evening to see if it can help me. Unfortunately, I cant stay away from floating point because this is what the v2xe outputs.

    Word is 2 bytes? I searched and read forever last night and the only definite conclusion I could reach was that it depends on the archietecture. Since my mcu is 8 bit, does this not mean 8 bit is the highest word the mcu can process?

  5. #5
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Still working on it but here is what I got so far. I havent finished the menu system, nor have I figured a way to convert the floating point numbers coming from the V2Xe.
    Attached Files Attached Files

  6. #6
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Lightbulb

    It might help to look at Melabs site .......

    http://www.melabs.com/resources/fp.htm

  7. #7
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Excellent! There is a subroutine to convert 32bit floats to a usuable ascii format. Hmm.. I dont think the 628 will hold all that code.

  8. #8
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by BertMan
    One, more thing....How many bytes are in a word for this particular mcu. Since it's an 8bit mcu, its two bytes right?
    Done some research on this and an 8 bit mcu means 8 bits to a word, which is the largest value the mcu can process. So, my next question is, how do I know when to set the variable to type word instead of byte when they both represent the same size - 8 bits?

    Am I posting in the wrong forum? Are my questions too stupid to answer? Am I on the right site? Or perhaps my questions are beyond the scope of the members here? Maybe I just dont have enough patience to wait for a response? Do I need to stfu and rtfm? Maybe someone could enlighten me before I go crazy talking to myself :-)
    Last edited by BertMan; - 21st September 2005 at 19:19.

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