Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 14 of 14

Thread: puzzle, little brain teaser

  1. #1
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679

    puzzle, little brain teaser



    The first who posts how this works (the more exact the better) will win a "Connector Board" and a 16MB Winbond Flash (perfect for the audio shield)

    Good luck and have fun :-)
    Last edited by Frank B; 09-27-2015 at 01:12 AM.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    http://www.adampetersen.se/reviews/hackers.htm

    My personal favorite is Steve Dompier's invention of the first IO-device for the Altair - playing music on a low-frequency radio by the interference made from writing to different memory locations on the Altair. It's brilliance, it's art, it's programming.

    <edit> bet you're not surprised to see me see this quickly <16 mins>. I did the BING search(es) to make sure I got the conceptual wordy things right with the above.

    The 960kHz AM radio frequency ( wikipedia.org Medium_wave ) is being produced by the Teensy processor operation and in close proximity it is getting picked up OTA as a fitting signal for the range in question and amplified. Is it done as 'for the Altair' accessing various memory ranges - or perhaps a series of loops or PWM frequencies? Hoping to see the code.

    <edit2> Electromagnetic interference :: He left with a computer kit with only 256 bytes of memory. At the April 16, 1975 club meeting Dompier keyed in a small program that played the song "Fool on the Hill" on a nearby AM radio. In the July 1975 Computer Notes, Bill Gates described this as "the best demo program I've seen for the Altair…" Gates could not figure out how the computer could broadcast to the radio.[8] (It was radio frequency interference or static controlled by the timing loops in the program.[9])
    https://en.wikipedia.org/wiki/Open_Letter_to_Hobbyists

    Sheet Music/BASIC listing of "Fool on the Hill" played on the Altair 8800 computer

    Last edited by defragster; 09-27-2015 at 12:32 AM.

  3. #3
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    664
    Those of you interested in keeping secrets inside your Teensy, take note. This is the basis for a classic side-channel attack: record the EMI of the device, perhaps over multiple runs. Correlate to basic operations of the processor. Identify the encryption algorithm from its signature, then extract the key. Search for Differential Power Analysis if you want to read more.

  4. #4
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    @pictographer :-) hehe
    @defragster or all: that's too general

    Yes i will publish the code.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Quote Originally Posted by pictographer View Post
    Those of you interested in keeping secrets inside your Teensy ... Search for Differential Power Analysis if you want to read more.
    Thanks Bing:
    http://www.rambus.com/differential-power-analysis/
    https://en.wikipedia.org/wiki/Power_analysis

    So you have to encrypt your code processing to make random spurious noise - and never encode / decode the same text the same way twice - and not do it in a uniform way - and yet get the same answer - that could add some overhead.

    <edit> this wasn't a question - or an attempted alternate answer - it was an ~OT reply in pictographer>
    Last edited by defragster; 09-27-2015 at 01:35 AM.

  6. #6
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    no :-)

    Hm, ok, to be fair - i dont want to give hints - and even saying "no" is a hint - i'll answer only once a day. except somebody has the solution.
    ok, one last hint for now: it's 1:55 after midnight. don't expect any more answers :-)
    Last edited by Frank B; 09-27-2015 at 01:02 AM.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    My guess is you've edited the audio lib PWM object, for a divisor of only 50 from the bus clock (48 MHz / 50 = 960 kHz). Teensy can easily produce PWM carriers in the AM radio band. It's pretty amazing the PCB trace with PWM can radiate enough RF for the radio to pick up, since it's on top of a ground plane. Even a short wire extending from the pin would probably help quite a lot.

    Of course, the data scaling code must be changed too, so the 16 bit data maps into the limited 0-49 range... perhaps only a small part of the 50 available codes, so the PWM waveform stays closer to 50%. I would imagine if you get too close to either duty cycle extreme, the amount of radiated energy in the carrier becomes quite a bit less.

    Maybe you just mapped the signal onto the raw codes with each sample repeated many times. Or maybe you're using another timer to trigger the DMA, since there's no need to rewrite the CV register repeatedly with the same value. Or maybe (and I hope) you might have kept the update at 1 sample per PWM waveform done some really crafty dithering and/or noise-shaped upconversion from 44.1 kHz to 960 kHz? My guess is such conversion might be able to achieve pretty good quality, despite the quantization from 16 to approx 5.6 bits (or less, if not using the entire 0-49 range), especially with sigma-delta noise shaping. From the video, it's hard to tell if the poor quality is due to weak RF, only about 5 bits of sample res, or the radio's speaker, or recording equipment used.

  8. #8
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,398
    Quote Originally Posted by Frank B View Post

    Good luck and have fun :-)
    I had fun, but I can only guess.
    Apart from knowing that AM is amplitude modulated carrier and noting no wire or anything else connected on the Teensy (3.2?) but some reduced signal when teensy was not flat over the radio, I realize that you generated a 960 kHz signal that is connected to a trace that runs cross the board, and modulated the radiated energy somehow.

    But my guess is that method is very simple
    simply put modulated 960 kHz signal (or sub-harmonic) onto DAC as there is no Antialiasing filter on DAC (however I cannot see the connecting trace to DAC).

    I will not repeat PWM as Paul mentioned it before.

  9. #9
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    The display seems to be a bit misleading. It displays 96.0 MHz. But you are right, that is not easy to recognize.

  10. #10
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,398
    Quote Originally Posted by Frank B View Post
    The display seems to be a bit misleading. It displays 96.0 MHz. But you are right, that is not easy to recognize.
    So it is FM and not AM.
    As this is the CPU frequency, so you changed the in internal loading capacitors of the Xtal accordingly (modulating the capacitors with fsig/6)

  11. #11
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    You're right !
    WMXZ, PM me :-)

    Ok, that was probably too simple? For the next time I have to think of something heavier.

    I'll upload the code to my github-account this evening.
    Last edited by Frank B; 09-27-2015 at 12:37 PM.

  12. #12
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408
    I'm glad you think it's simple.

    Meanwhile, I'm still stuck at the train station with the train hurtling on in the distance. :-D

  13. #13
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Link: https://github.com/FrankBoesing/output_fm

    I modified the DAC-Output-object - The Teensy modulates its own frequency with dma to the OSC0_CR register.
    The quality is, unfortunately, very poor.

  14. #14
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,398
    Frank,
    you PM Inbox is full,
    wanted only say that letter has arrived
    Grazie
    Walter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •