help about compiler of C8051F800

Discussion in 'Embedded Systems and Microcontrollers' started by the kid, Jul 11, 2016.

  1. the kid

    Thread Starter Member

    Jan 4, 2015
    58
    1
    Hello every one
    i m programming to measure capacitive by using CS0 (capacitive sense) modul of C8051f800.
    I'm having problem that all Compliers I using are not support that MCU. I m using Mikro C and keil C.
    How to program MCU C8051F800?
    could anyone help me, please
    thank you
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,394
    497
  3. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    What exactly do you mean the compiler doesn't support the device? Does that mean you have no canned header file? Does it mean the compiler doesn't know how to write the output to the device? If the compiler doesn't support the device you need to change compilers or change devices.
     
  4. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    SL has the software, but you have to register and there might or might not be a price.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    The reason I wrote what I did is that when I first used the IAR compiler, the particular 8051 variant was not supported by the distribution we received. We had to write our own header file to define the CAN peripheral and we had to write a linker script. I was able to do that in my sleep with one hand tied behind my back. It was not much of an impediment. We used an Atmel application called FLIP to write the .HEX file into the device.

    Complaining about lack of support from a Compiler vendor is just being a helpless weenie.
     
  6. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    From SL:
    Keil® PK51 Developer’s Kit

    The Keil PK51 Developer’s Kit includes an industry-leading 8051 C compiler, linker and assembler for use wih Silicon Labs’ 8-bit microcontrollers and Studio. This toolchain package provides the build support for 8051 projects, while the IDE provides editing and debugging support. This free toolchain comes without a time or code size limit!
    http://www.silabs.com/products/mcu/Pages/8-bit-microcontroller-software.aspx#keil-pk51
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    If I understand you correctly, you're saying the compiler does support the part despite the TS's protestations to the contrary. I guess that's a double weenie, and you've pwned 'em.
     
  8. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    First of. When I quoted your post #3, I did not mean to imply that you need the software. I meant the OP can simply download the software from SL website.

    More generally. When OP asked for software, I googled the chip and found out that it is made by Silicon Labs. I then went to their website and started looking for software for that chip. The two links that I provided so far are for that chip, and SL lists the appropriate software for it. Now, the thing that I don't know is what SL wants for compiler tool chain, the website says that you need to register to receive some unlock code. OP can just download the compiler tool chain and use whatever editor they want. The SL IDE (Studio), that can be used with the compiler, does not have any mention of registering, just a link to download.


    sl.jpg
     
  9. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    Then I'm still not clear on why microc is unsuitable given that pretty much all 8051 compilers will generate correct code for the part and the first trick is to have a .H header file that correctly identifies the SFRs. The second trick is how to get the linker to understand the particular part's memory map. With those two tricks I believe I can get almost any 8051 compiler to work for almost any 8051 part. I still want to know what support the TS/OP thinks he needs.
     
  10. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    Notice that OP is asking about capacitance sensing feature of the chip. Standard 8051 does not have this feature. I am guessing we are dealing with SL's special variation of 8051 so standard software does not have support for these special features. I can give you another example, SL and someone else make 8051 with USB on the chip, very handy in this day and age, but you need their software to take advantage of it because the regular software for 8051 does not support it because it is not standard 8051 feature.
     
  11. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    I am aware of the fact that 8051 variants have different peripherals. All you need is a way to access the SFRs. That information is contained in a .H file. Any generic compiler with an 8051 backend can support any conceivable SFR map. There were no header files for the CAN controlller in the Atmel 8051 we used. We had to build the .H file ourselves. It took some time, but it was hardly an impediment to using the compiler (IAR) we paid 2.5 kilobucks for.
     
  12. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    I think we are dealing with a student who does not have experience in the area you describe, who relies on provided libraries and header files. In my own uC class we were not shown how to create header files, the extent of our work was to write the code to produce certain results and to use header files and function libraries already setup for us. My guess, OP has a setup provided by school, they have some experience using regular 8051 and never ran into a problem with the setup provided by the school, but now they are working on a project, they picked a more modern/advanced version of 8051 and standard school setup is not enough. I also note that English might not be their native language, but that is also a guess on my part.
     
    JohnInTX and the kid like this.
  13. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    All of that is true, but looking at a header file should be all it takes to figure out what you need to do, especially for something as straightforward as an 8051. Is spoon feeding people the things they need really a valid teaching technique. Who did we have to whine to when something we needed was missing? That's right -- nobody. We either built what we needed or we did without. I will admit that coming up with appropriate linker scripts for the 8051 and it's arcane memory architecture might need a bit more guidance. Maybe there is just not enough time to learn things the way we did.

    If English is really an impediment maybe there should be more forums in other languages.
     
Loading...