Shop OBEX P1 Docs P2 Docs Learn Events
uOLED Clock/PLL in Demo Code — Parallax Forums

uOLED Clock/PLL in Demo Code

Timothy D. SwieterTimothy D. Swieter Posts: 1,613
edited 2008-01-07 04:34 in Propeller 1
First - this thread isn't intended to start another indepth discussion about 4D Systems spec vs Propeller Datasheet regarding the clock frequency.· There are several good thread that are enlighting to read on this topic.

While I was in the US for Chirstmas I received the uOLED-96-PROP that I ordered.· I love the little packaging and the great look of the OLED.· I have liked OLEDs for sometime and love the small development platform 4D Systems has created.·

When I got the uOLED to Hong Kong I powered it up and it ran as the demo as expected.· then I wired it up to work with my Prop Plug.· I downloaded the demo code from the Parallax product page (it should be the same code that comes preloaded on the device), but when I downloaded it to the chip it didn't work.· I checked 4D Systems page to confirm Parallax was mirroring the same software and it is the same software.

After a while of experimenting and reading on the forum I tried changing the ''_CLKMODE= XTAL1 + PLL16X" to "'· _CLKMODE= XTAL1 + PLL8X" and then the code worked when downloaded.· So, again not to start another thread discussing 64 MHz. vs 128 MHz., but I am curious if this is the same experience that others who have purchased the uOLED-96-PROP have had.· If so, then I recommend to Parallax and 4D systems to adjust the demo code.

Anyone else have trouble downloading the code when the "_XINFREQ= 8_000_000" and "_CLKMODE= XTAL1 + PLL16X"?· I wish I could have the Prop running at least 80MHz. but at the moment it looks like I need to run at 64MHz.·I need to do some more reading about the PLL and clock mode.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
tdswieter.com
One little spark of imagination is all it takes for an idea to explode

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2008-01-04 01:32
    Timothy D. Swieter said...
    I need to do some more reading about the PLL and clock mode.
    Although I am always happy to hear such words, I doubt it will help you for this situation. You are using the Propeller FAR out of its spec and some programs will work and some will not.
    WRT the demo code: the only explanation I have is that the demo code that comes in the ROM does not configure XTAL1+PLL16X...
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-01-04 02:11
    Thanks deSilva. I am not necesarily interested in 128MHz., but I wish I could run it at 80MHz. I need to review my application, I am probably fine running at 64 MHz. I need to review the routines I want to write for the OLED and some peripherals that I am going to to attach to the Prop to see what rates I are viable at 64 MHz.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-04 03:05
    Tim,
    I completely agree with you about the 96... what a cutie pie. AND just the idea of all that power in that tiny little package is so...oh... good.

    I did exactly the same thing as you...ordered it... waited forever and finally got to test it... except my demo code did run!!!

    The only problem was my GPS code (based on the published smart mode) was returning regular garbage.

    I don't want to start any arguments either... mostly because I really don't know anything about this issue for certain...BUT

    there is a thread in this forum... don't know where... it is easy to find through the 4D corporate uoled forum... and it turns out that there is a fully documented problem on the Prop side in the serial timing... from the discussion it sounded like it is fixable but might require a major change in the structure of the serial code, which makes it a guru issue. It isn't at all clear to me that this particular problem is a hardware issue at all[noparse]:)[/noparse]

    It is nice to be reminded of the physical limits of the Prop... but after reading everything, I'm not convinced that this issue has anything to do with the hardware... from either Parallax or 4D.

    Don't know for sure, that's just how it sounded to me.

    What is most amazing is the rapid development of these products. It sounds like the guys at 4D never sleep.

    I hope they never sleep again[noparse]:)[/noparse]

    Happy New Year

    Rich
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-01-04 03:52
    Thanks Rich. So when you got the product, you downloaded the demo code from 4D or Parallax and it worked (without modifications to the software) when you sent it to the Prop?

    I think I need to reread the other threads again. Maybe I should construct a test of some sort to see if the uOLED-96-PROP is running when I download software to it at 128MHz. clock. Any thoughts from the forum on what kind of test can be written and run?

    I downloaded the datasheets for the OLED controller chip. This is a similar chip to some other software I was writing a while back but never completed. I may rework the software and implement an ASM driver for the OLED.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-04 04:12
    Tim,

    I downloaded it from 4D. But I think they are the same.

    There is a complete data sheet available from Solomon?... but it is about 40000 pages long[noparse]:)[/noparse]

    I'm also interested in finding a minimal hardware configuration for Femto Basic on the 96. How about a serial keyboard?

    I have a feeling that Mike knows a lot more than he can say... so whatever else you do, take a look at what he has done.

    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-04 04:15
    Tim...

    I didn't answer one of your questions[noparse]:)[/noparse]

    Yes absolutely it worked with and without modifications... right out of the box. I think that it might have something to do with exactly which version of the serial object you have installed... but that is just a suspicion.... of could also be ambient temperature in the room, a batch difference, etc, etc[noparse]:)[/noparse] But personally I think it is a software issue.

    Rich
  • Paul Sr.Paul Sr. Posts: 435
    edited 2008-01-04 13:12
    Timothy D. Swieter said...
    First - this thread isn't intended to start another indepth discussion about 4D Systems spec vs Propeller Datasheet regarding the clock frequency. There are several good thread that are enlighting to read on this topic.


    While I was in the US for Chirstmas I received the uOLED-96-PROP that I ordered. I love the little packaging and the great look of the OLED. I have liked OLEDs for sometime and love the small development platform 4D Systems has created.



    When I got the uOLED to Hong Kong I powered it up and it ran as the demo as expected. then I wired it up to work with my Prop Plug. I downloaded the demo code from the Parallax product page (it should be the same code that comes preloaded on the device), but when I downloaded it to the chip it didn't work. I checked 4D Systems page to confirm Parallax was mirroring the same software and it is the same software.



    After a while of experimenting and reading on the forum I tried changing the ''_CLKMODE= XTAL1 + PLL16X" to "' _CLKMODE= XTAL1 + PLL8X" and then the code worked when downloaded. So, again not to start another thread discussing 64 MHz. vs 128 MHz., but I am curious if this is the same experience that others who have purchased the uOLED-96-PROP have had. If so, then I recommend to Parallax and 4D systems to adjust the demo code.



    Anyone else have trouble downloading the code when the "_XINFREQ= 8_000_000" and "_CLKMODE= XTAL1 + PLL16X"? I wish I could have the Prop running at least 80MHz. but at the moment it looks like I need to run at 64MHz. I need to do some more reading about the PLL and clock mode.

    I brought this "issue" up and provided detail (from testing) in a previous thread. You will find lots of things that do not work if you use "_XINFREQ= 8_000_000" and "_CLKMODE= XTAL1 + PLL16X" - like IF statements!!! I use 8 & 8 for everything now when I am working with this device.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-01-04 13:30
    Thanks for the detail Paul Sr. I will keep this in mind then as I develop my applications for the device.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • hippyhippy Posts: 1,981
    edited 2008-01-04 17:48
    I believe the bottom line can be best put that if 8MHz+PLL16x works you have been lucky, it may not continue to work as expected and other code may not work at all or be flakey.

    Using 8MHz+PLL8x works but limits to 64MHz. To get 80MHz ( or 96MHz ) would require the fitted crystal to be replaced with another, 5MHz, 6MHz or 10MHz.

    4D Systems were said to be guaranteeing 128MHz so it may be worthwhile contacting them. The obvious solution in my eyes would be for 4D Systems to fit one of the alternative crystals during manufacturing which would overcome all 128MHz operation issues and allow uOLED-96 80MHz or 96Mhz operation.
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-04 18:04
    Yes Hippy, that's the bottom line from the second posting here in this thread smile.gif
    I personally will no longer attend to any discussion about this 128Mhz nonsense. Sorry Tim, no offence intended.
  • Paul Sr.Paul Sr. Posts: 435
    edited 2008-01-04 18:22
    hippy said...
    I believe the bottom line can be best put that if 8MHz+PLL16x works you have been lucky, it may not continue to work as expected and other code may not work at all or be flakey.

    Using 8MHz+PLL8x works but limits to 64MHz. To get 80MHz ( or 96MHz ) would require the fitted crystal to be replaced with another, 5MHz, 6MHz or 10MHz.

    4D Systems were said to be guaranteeing 128MHz so it may be worthwhile contacting them. The obvious solution in my eyes would be for 4D Systems to fit one of the alternative crystals during manufacturing which would overcome all 128MHz operation issues and allow uOLED-96 80MHz or 96Mhz operation.

    I agree 100%. The unit I have runs the "standard" demo just fine. The issues started surfacing (I was serious about IF statements breaking!) while I was expanding the "standard" demo code (building the Circle method) and developing an LCD driver (for PHA/Wulfden Serial card). 8MHz+PLL16x is very unpredictable. I wish I could swap out that 8MHz crystal!
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-04 21:05
    Tim,

    One more thang... the pinouts for the uSD card appear to be incorrect in the User Manual, V1.1... Mike Green has it right in OLED_definitions.spin which can be found in uOLED96PropBasic in the Object Exchange.

    cs 14
    clk 15
    do 16
    di 17


    Rich
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-01-05 00:30
    Thanks for the help from all the forum. I understand the issues of clock operation of the uOLED is beaten to death.

    So, what is the part number for the crystal on the uOLED and is there a 5MHz. or 6MHz. version that is the same package? Looking at the package it may not be an easy soldering job.

    Away hunting I go....

    Thank Rich for the revised pinout, any one confirm this?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-01-05 00:53
    I spoke with Duffer when this issue first came to light, the 8MHz crystal is a smaller physical size than the 5 and 6 MHz crystals. You may be able to use a 10MHz crystal instead to get to 80MHz.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-01-05 01:08
    Can anyone confirm Rich's µSD pinout correction?
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-05 05:03
    Fred,

    I posted a sample in my thread... it has a defect in it(my programming) , but it is enough to verify the pin assignments.

    I always try to connect the dots... problem is sometimes the dots aren't really connected.

    This is perfect example...

    I got the 96, downloaded the demo, saw that it didn't do what the demo for the 128 did in terms of writing images to the uSD card and then found that the pin-outs in the manual were wrong. I figured that there must be a reason for this coincidence. I thought "maybe there really is a problem with the product"... "possibly related to all of the hubbub in the other thread?"...

    turns out: THERE IS NO PROBLEM WITH THIS PRODUCT... just plenty of room for developers to have some fun.

    These uOLED's are awesome little products! Ordered another 96 last night[noparse]:)[/noparse]

    Rich
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-01-05 08:25
    Rich, I figure you're right. I was hoping for a groundswell of ready confirmations and at least one from Duffer.
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-05 12:10
    I get the feeling that everyone is fully engaged... hopefully with a 640X480 uOLED... with full video and enough ram to hold a couple of images[noparse]:)[/noparse])
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-05 12:14
    Make that 648 by 486... [noparse]:)[/noparse]
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-05 15:54
    Tim,

    I am off to the Special Olympics to watch snow shoe races in the mud[noparse]:)[/noparse] I posted some almost working uSD code over in my thread... with one simple issue that is driving me to distraction. If you have time, see what you think.

    Thanks,

    Rich
  • DufferDuffer Posts: 374
    edited 2008-01-05 22:55
    I·will make one "guarded" comment to the original poster. The 96-PROP object and demo, V4, were written by me under the assumption, right or wrong, that the Propeller chip would run at speeds in excess of 80 MHz. I did not and have not encountered any problems with more than 50 units that I have shipped.·I install an extended version of the SPIN Object and demo code, V4.1, on each and every 96-PROP before I ship it. If it won't run the demo continuously for 15 minutes without failing, it doesn't get shipped. I have had one 96-PROP failure (a hardware problem with the display) withe the more than 50 that I've shipped.

    One cautious word about demos: It is the nature of a demo (demonstration of a product's capabilities) to show the product at it's best. Domos are routinely "contrived" to show the best performance possible. That is not the case with the 96-PROP demo. I wrote the demo code beleiving that the device could run at 128 MHZ and I did not encounter any problems during the writing of the code that made me think otherwise.

    It might be worthwhile, for comparison, to note that just because an automibile might be advertised as being capable of going 120 MPH, that does not mean that it will be able to "corner" at 120 MPH (don't try this at home).

    Likewise, even though the 96_PROP demo will reliably run at 128 MHz, doesn't mean, nor did I intend to suggest, that all code nor all projects would run at 128 MHz. That is for the user to determine (max cornering speed is something you have to determine from experience and experimentation). ;-)

    Best regards,

    Duffer
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-01-05 23:56
    Thanks Duffer for your comments. I haven't seen you post in a while, glad you popped in.

    Since you are closer to the action, do you want to comment on the consumer changing the 8 MHz. crystal out for a 10 MHz. crystal to be able to run at 80 Mhz.? This is an after market mod of course and not supported by 4D but if you have any thoughts I would love to hear them.

    Say....what else do you have cooking for your next product? I like the uOLED - it is a beautiful display and compact development platform for the Propeller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • DufferDuffer Posts: 374
    edited 2008-01-06 00:53
    I've been really covered up lately with work and haven't had much time to post, but I have been watching with interest, the goings on here.

    As concerns your idea of replacing the 8 MHz crystal with a 10 MHz part, it's not something I would attempt. The chances of me getting that done right with my fat fingers and old shakey hands would be about zero. I understand that some people have had a degree of success reworking and replacing parts of the size you're talking about (the crystal is one of the two largest parts on the board). I can tell you (because Atilla from 4D mentioned it in a post here some time ago) that the 96-PROP probably would have been built with a 10 MHz crystal from the beginning except for a shortage of that particular part when the boards were being built (how's that for ironic).

    As for what's coming next, that's part of the reason I've been so busy lately. The new uDRIVE-uSD-G1 units are finally in full production. I have some in stock now, but haven't even had a chance to update my web site. Info at:

    http://www.4dsystems.com.au/prod.php?id=22

    96-PROPs and 96-G1s are finally back in stock and I've been busy with some large commercial projects involving the new 4D products.

    Also, 4D has managed to locate a reliable source for the new AMOLEDs (Active Matrix OLED in sizes up to 2.8") that are just beginning to be available in quantity and in larger sizes. This has caused quite a stir among 4D's commercial customers and there has been a big push to make these available as early as Q2 this year which means a lot of custome design and programming work to make their deadlines. Especially given that most of the new, larger displays will also be available with a touchscreen option (which will also be available on their new uLCD 3.2" display available in February).

    Regards,

    Duffer
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-01-06 02:18
    Duffer, a suggestion for the demo program -- it would be nice if it read a keypress (and an escape sequence on the serial input line) that sends the display into a legitimate shutdown. As it ships now, you can plug it and get the demo but can't quit or power off without 'risking' an unrecommended stop.
  • DufferDuffer Posts: 374
    edited 2008-01-06 02:56
    Good suggestion Fred. Feel free to change the demo any way that you see fit. There are methods in the uOLED-96-PROP_V4 object (PowerDown_Seq and PowerUp_Seq) that you can use for that purpose. You could create a new method in the demo program that powers the screen down, waits a number of seconds and then powers the screen up again. This would give you ample time to disconnect the display before the power up and the next cycle through the demo loop (that's the method I used with the Prop demos for the 128-GMD1 and 160-GMD1 OLED displays). Another alternative would be to change the demo to loop a certain number of times and then fall through to a power down call and then stop.

    There is no serial connection in the demo. It only requires Power and GND to run once the demo code is loaded.

    Duffer
  • Paul Sr.Paul Sr. Posts: 435
    edited 2008-01-06 19:12
    Duffer said...
    I will make one "guarded" comment to the original poster. The 96-PROP object and demo, V4, were written by me under the assumption, right or wrong, that the Propeller chip would run at speeds in excess of 80 MHz. I did not and have not encountered any problems with more than 50 units that I have shipped. I install an extended version of the SPIN Object and demo code, V4.1, on each and every 96-PROP before I ship it. If it won't run the demo continuously for 15 minutes without failing, it doesn't get shipped. I have had one 96-PROP failure (a hardware problem with the display) withe the more than 50 that I've shipped.

    One cautious word about demos: It is the nature of a demo (demonstration of a product's capabilities) to show the product at it's best. Domos are routinely "contrived" to show the best performance possible. That is not the case with the 96-PROP demo. I wrote the demo code beleiving that the device could run at 128 MHZ and I did not encounter any problems during the writing of the code that made me think otherwise.

    It might be worthwhile, for comparison, to note that just because an automibile might be advertised as being capable of going 120 MPH, that does not mean that it will be able to "corner" at 120 MPH (don't try this at home).

    Likewise, even though the 96_PROP demo will reliably run at 128 MHz, doesn't mean, nor did I intend to suggest, that all code nor all projects would run at 128 MHz. That is for the user to determine (max cornering speed is something you have to determine from experience and experimentation). wink.gif

    Best regards,

    Duffer

    I have had one of these units since the release and I still enjoy it, however, gotta say, Duffer, that is one of the best crafted Marketing shuffles I have seen in a long time!!!
  • DufferDuffer Posts: 374
    edited 2008-01-07 04:34
    Thank you.
Sign In or Register to comment.