Block diagram for PIC based mp3 player


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,144


    Did you find this post helpful? Yes | No

    Default

    Well, about that C stuff, C in general forces you to be a better programmer, having to structure your program more efficiently. Also forces you to use functions, the equivalent of a subroutine, but more efficiently. For example, calling a function in C, lets you pass variables that really aren't used before and won't be used after. So memory is really conserved that way.

    In Basic compiler this is not the case. You have to declare the variables that are going to be used and they reserve their location permanently.

    Other than that, I think it is up to the compliler to be as much efficient as possible.

    See how Fred Eady managed to convert C routines to PBP and create TCP/IP stack:

    http://www.edtp.com/downloads.htm

    And Trent, yes. The C example you post has nothing different from the respective PBP one.

    Only that C programmers when see a goto are getting crazy. So I would use at PBP also the same while 1/wend to cool them down! At the produced ASM code level, it is really the same, so what's the fuzz about?

    Ioannis
    Last edited by Ioannis; - 17th December 2007 at 18:00.

  2. #2
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Well, about that C stuff, C in general forces you to be a better programmer, having to structure your program more efficiently. Also forces you to use functions, the equivalent of a subroutine, but more efficiently. For example, calling a function in C, lets you pass variables that really aren't used before and won't be used after. So memory is really conserved that way.

    In Basic compiler this is not the case. You have to declare the variables that are going to be used and they reserve their location permanently.
    That's an excellent explanation that makes a lot of sense.

Similar Threads

  1. Embedded MP3 player from Sparkfun
    By ScaleRobotics in forum General
    Replies: 3
    Last Post: - 10th March 2010, 04:41
  2. config bits
    By brianD in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th February 2010, 13:45
  3. Setting up internal clock correctly?
    By JohnM in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th March 2008, 20:29
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  5. PortE problems (PIC18F4455)
    By RubenR in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 12th July 2006, 15:26

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