I got some SST89E516RD (8051), need xtal advice.

Discussion in 'Embedded Systems and Microcontrollers' started by shteii01, Jun 5, 2015.

  1. shteii01

    Thread Starter AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    Microchip says 40 MHz is max.

    Should I go straight for 40 MHz?
    If I get 40 MHz, what about frequency tolerance? Is it ok that the crystal has +30ppm (40.0012 MHz)?

    If 40 MHz is not desirable (or achievable). What is the highest desirable frequency for the xtal?
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Go right ahead and use that 40HHz crystal.

    This is one of the rare cases where "maximum" means "maximum (nominal)"
     
  3. korchoi

    Member

    Jun 5, 2015
    59
    6
    that's right. Go for the 40Mhz crystal. Unless you will be working on something with very tight timing tolerances.
    Oh, and don't forget to check the capacitor values for a 40mhz crystal. They sould be on the range of tens of picofarads.Details on the datasheet.
     
  4. shteii01

    Thread Starter AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    The one crystal I looked had 18 pF caps in datasheet.

    My next step was to connect it to RS-232 chip so that I can program the uC from pc. The tutorial that I am copying it from used 11.0592 MHz crystal. I thought they used lower frequency because of the "original" 8051 design that had the max of 12 MHz. As you know "newer" 8051 now can work with much higher frequencies. Should I change to the lower frequency or can I continue with the 40 MHz frequency?
     
  5. korchoi

    Member

    Jun 5, 2015
    59
    6
    It depends. If the clock during programming comes from the PC, then the crystal on the board will not matter, as the clock will be determined by the PC.
    Can you link to the programmer? from what you wrote (RS232 chip and PC connection), you are probably making a JDM programmer.
    These 8051 chips are not programmed the same way a PIC16, PIC12 or PIC18 is. Just as an example, the pic16f84 uses about 4 wires; the 8051, about 20.
    make sure you are using the proper programmer.
     
  6. shteii01

    Thread Starter AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    This is the tutorial I am following, very simple: http://chaokhun.kmitl.ac.th/~kswichit/Flashflex/EasyIAP.html
     
  7. JWHassler

    Member

    Sep 25, 2013
    201
    33
    Looking at the page about your setup, it seems that the MCU has an on-board boot-loader that needs a specific baud-rate.
    Its UART setup values are thus in non-(?)rewritable flash
    But further down the page, it refers to 'auto baud-rate detection.'
    At 40 Mz the baud rate will be too high by 3.62x,- not necessarily a problem- but any timing values will be similarly fast, very likely a problem.

    I'm not in charge here, but I suggest using the 11+ MHz crystal until you are sure of the situation.
    .
     
  8. shteii01

    Thread Starter AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    Yes, it has boot loader. One of the reasons I selected it in the first place.

    I think Silicon Labs also has 8051 with boot loader, but it does not come in DIP package.

    Ok, I will get both crystals. Should make things interesting to see if 40 MHz will work.
     
  9. korchoi

    Member

    Jun 5, 2015
    59
    6
    The part used in the tutorial you linked is actually An NXP version. Is the chip you have a sst89e516rd(from microchip) or ap89v51rd2(from nxp)?
    Here's what i found, straight from the datasheet, page 21, 6.3.4 using ISP, line 5:
    "The ISP feature requires that an initial character (anuppercase U) be sent to the P89V51RB2/RC2/RD2 to establish the baud rate"
    this suggests that the baud rate is set by the Programmer software, so 40MHz crystal or 11MHz crystal, it doesn't matter.
    That is, If the 8051 you got is actually the nxp version.
    If your 8051 is a microchip version, there will be no bootloader to ease your life.It will need a different board.

    The time of writing for this post suggests that i have no life outside the forums.
    I really need to enforce my early bedtime, else i will be sleeping on the classroom desk.
    I need some sleep, but hanging around here is so enlighting for me!
     
    Last edited: Jun 6, 2015
  10. shteii01

    Thread Starter AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    Let me clarify.
    1. The tutorial text explicitly states that they use Microchip SST89E516RD.
    2. I ordered and received from Microchip SST89E516RD.
    3. On Page 2 of the datasheet for SST89E516RD it says:
    "The devices are pre-programmed with an example of the bootstrap loader in the memory, demonstrating the initial user program
    code loading or subsequent user code updating via the IAP operation. The sample bootstrap loader is available for the user’s reference and convenience only;"

    I just ran a search of the datasheet pdf for iap and I think I found my answer. On Page 73 it says that Oscillator Frequency for IAP for SST89E516RDx, minimum 0.25 MHz, maximum 40 MHz.
     
  11. korchoi

    Member

    Jun 5, 2015
    59
    6
    Well, it's good to see your doubt is quenched.In the end, basically any crystal would do.
    Now a bit off-topic, these are truly some interesting parts: simple, but standardized ISP; Fast version of a familiar core; lots of IO. All that on a DIP.
    What will you do with it?Let us know when you put this little beast to use.
     
  12. shteii01

    Thread Starter AAC Fanatic!

    Feb 19, 2010
    3,394
    497
    I have not done anything, yet. Just got my order of the uC chips from Thailand a few days ago. Now I will be buying the rest of the parts from that schematic and I am getting USB to RS-232 cable, I am looking at something like 25-30 dollars total from Digikey/Mouser, the bloody cable will be the most expansive part!

    In my uC class we used 8051, so I have some little experience working with 8051 (both assembly and C) plus the textbook from my class. My senior design work was using Arduino Due, that was Atmel AVR chip. Most people on these forums, seems to me, mostly use PIC and I have zero experience with it. I am not saying that nobody here knows 8051, just that most topics seems to be about PICs.

    I do want to try my hand in making a gadget... so I started looking at uC. Came across Phillips 8051 with boot loader from the factory, then found out that NXP stopped making them in 2012. I just did not want to invest into programmer device. So I kept looking for 8051 with boot loader, there are literally 3 or 4 of them on the market right now, but only one DIP, the Microchip SST.

    If I ever finish this gadget, the next thing will be to try one of the newer 8051 with USB, Silicon Labs has one, but it does not come in DIP package so I will have to buy adapter socket/board before I do anything with it. Also there are PIC chips with USB in DIP package, but I would want PICkit for it...
     
Loading...