Re: [jallib] PWM serial audio transmission

2022-02-24 Thread vsurducan
Kiste, not only the ZX81 but Sinclair Spectrum and most of it's clones did
the same.
The biggest problem was the tape speed variation (among the volume
variation which was corrected in romanian clones -and we had more than any,
I recall 5 different types).

Hans, on the actual PIC18 series on which JAL works ( presuming you will do
with JAL) you might have some sampling speed issues. You need at least
7.5us for an ADC sample and according to Nyquist theorem you need not 2x (
which is pure theoretical) but at least 4x faster sampling than maximum
frequency you are recording.
After your AD is sampled, the PWM is not an issue, but you might experience
a small delay between real recorded speech and the PWM filtered one.
If you plan to add voice for your puppet, then limiting to 4KHz may be a
good choice.

best wishes,
hopefully not WW III, but in pace for playing nice...

On Thu, Feb 24, 2022 at 10:38 PM 'Oliver Seitz' via jallib <
jallib@googlegroups.com> wrote:

> Hi Rob,
>
> connecting two PICs is not like an audio recording. Better connect the pic
> to your soundcard to record and then playback, that way you'll get
> something similar to a tape recorder.
>
> The difficulties when using audio equipment are (at least):
>
> - only alternating current is transmitted
> - the volume is never exactly the same
> - the frequency range is limited to like 100Hz-10kHz
> - the line level voltage is less than 1V
>
>  Reading should be possible by most PICs which have comparators. Only a
> resistor is needed, then you can detect zero crossings.
>
> The Sinclair ZX81 used audio equipment as storage. A burst of three
> oscillations coded a zero, five coded a one. The output was low-pass
> filtered. You usually had to try loading a program several times, slightly
> adjusting the volume, until you got lucky.
>
> Greets,
> Kiste
>
> Am Donnerstag, 24. Februar 2022, 19:56:01 MEZ hat Rob CJ <
> rob...@hotmail.com> Folgendes geschrieben:
>
>
> Hi Hans,
>
> If I understand you right the only thing you want to do is to record a
> signal or a sequence of signals on a casette player  that can be used to
> trigger something when the recording is played back right?
>
> If my initial suggestion would work - which may work since I have the idea
> that my Apple II did more ore less the same thing - I could give it a try
> to do a proof of concept.
>
> I may have a the problem that I do not have a casette recorder but I could
> fake it by just connecting two PICs to see if that works. The final test
> could then be done by you.
>
> Which PIC type are you using?
>
> Kind regards,
>
> Rob
>
>
>
> --
> *Van:* jallib@googlegroups.com  namens hans <
> hansvanveldhuize...@gmail.com>
> *Verzonden:* donderdag 24 februari 2022 17:07
> *Aan:* jallib 
> *Onderwerp:* Re: [jallib] PWM serial audio transmission
>
> Another piece of text:
> So far I've done everything with MIDI. I used one midi channel for the
> actions with a general command type. Then 2 data, one for the device nr
> (16) and one for the command. (0-128)
> This has worked well for years, but it does require a complete MIDI sound
> package.
>
> Op donderdag 24 februari 2022 om 16:55:46 UTC+1 schreef hans:
>
> Hey ,
> I have tried a circuit with an MT8880 but the ICI has failed. I did hear
> the 16 tones, but when I wanted to receive them, the chip gave up the ghost.
> In theory I understand your suggestions well, but developing something
> like this is not easy for me. I'm just a LEGO builder.
> regards
> Hans
>
> Op woensdag 23 februari 2022 om 19:30:37 UTC+1 schreef rob...@hotmail.com:
>
> Hi Hans, Kiste,
>
> You can still by DTMF decoders and I assume also DTMF encoders. Just look
> at for example Aliexpress and type DTMF.
>
> But another suggestion. Many, many years ago I had built an Apple II and
> I used cassette tapes to store and load games which was using tones
> generated by the Apple II itself using two tones, one for high, one for low
> and one as a lead-in tone (not sure in the lead-in tone was another tone)
> to synchronze the start of the recorded program. You would not need this
> lead-in tone in your case
>
> So I think it may not be that complex:
> -) For recording on casette, generate this dual tone by the PIC  via PWM
> or maybe it is also sufficient to generate one tone in case of a 1 and no
> tone in case of a 0 but I think this will be less reliable.
> -) For playback, measure the length of the recorded PWM tone. If is is
> within a certain range you accept it as a one and in case of two tones the
> lower tone could be zero and the higher tone is one.
>
> As long as the tone frequency is not too high, I think this could work.
>
> A more advanced solution would be to use a phase locked loop (PLL) but I
> am not sure if it will work. The PLL locks to the input signal so the
> voltage that controls the oscillator goes up and down to follow (lock on
> to) the input signal and this oscillator voltage signal could then be used
> by a 

[jallib] [jallib build] buildbot success in jallib on jallib-standard

2022-02-24 Thread build
Hi guys,

This is buildbot speaking. I have finished a build of jallib-standard on jallib.
Buildslave for this Build: sebbot

Build Reason: 
Build Source Stamp: HEAD
Blamelist: rob.jansen

Build succeeded!
Logs are attached.

sincerely,
 -The Buildbot

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jallib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/E1nNSMq-0006j4-Eo%40casadeyork.com.
Updating '.':

UU   include/external/lcd/glcd_ssd1306.jal

UU   include/external/rtc/rtc_ds3231.jal

Updated to revision 3816.

2727 samples to validate...

1120 libraries to validate...

All files validated :)

Environment config

JALLIB_ROOT=/home/mattschinkel/jallib/slave/standard/build

JALLIB_REPOS=/home/mattschinkel/jallib/slave/standard/build/include

JALLIB_SAMPLEDIR=/home/mattschinkel/jallib/slave/standard/build/sample

JALLIB_JALV2=/home/mattschinkel/bin/jalv2

JALLIB_PYTHON=python2.7



Time duration: 315 secs

jal jalv25r6 (compiled Oct 29 2021)

Required parameter to hex is missing!

no source file, use /home/mattschinkel/bin/jalv2 --help for help

Error while compiling file (status=1).

See previous message.

2727 samples to compile...

All samples compile :)

Environment config

JALLIB_ROOT=/home/mattschinkel/jallib/slave/standard/build

JALLIB_REPOS=/home/mattschinkel/jallib/slave/standard/build/include

JALLIB_SAMPLEDIR=/home/mattschinkel/jallib/slave/standard/build/sample

JALLIB_JALV2=/home/mattschinkel/bin/jalv2

JALLIB_PYTHON=python2.7



Time duration: 1831 secs



Re: [jallib] PWM serial audio transmission

2022-02-24 Thread Rob CJ
Hi Hans,

I wrote a transmitter and receiver program for the PIC12F615 since for the 
transmitter is has a hardware PWM output. For the receiver I use timer 1.

The code is quite simpel and only took about an hour to write but I need to 
finetune it (and maybe it does not work at all ).

It of course takes time to measure and so detect the signal. What is the 
maximum allowable delay after a signal is played back and the actual trigger?

It is only one tone that I need to detect, right?

Thanks.

Kind regards,

Rob


Van: jallib@googlegroups.com  namens hans 

Verzonden: donderdag 24 februari 2022 21:46
Aan: jallib 
Onderwerp: Re: [jallib] PWM serial audio transmission

Hi Rob an Kiste,
I'm glad you want to help me. To be clear, except that my aging body is also 
slowing down, the gray knit from above is not so easy anymore. Besides the 
little ones I still have the 16F15325, 18F4455, 18F4550 and 18F4520.
Attached is the program I had made for the DTMF of which the MT8880 was killed 
for info.
regards
Hans

Op donderdag 24 februari 2022 om 21:38:36 UTC+1 schreef Kiste:
Hi Rob,

connecting two PICs is not like an audio recording. Better connect the pic to 
your soundcard to record and then playback, that way you'll get something 
similar to a tape recorder.

The difficulties when using audio equipment are (at least):

- only alternating current is transmitted
- the volume is never exactly the same
- the frequency range is limited to like 100Hz-10kHz
- the line level voltage is less than 1V

 Reading should be possible by most PICs which have comparators. Only a 
resistor is needed, then you can detect zero crossings.

The Sinclair ZX81 used audio equipment as storage. A burst of three 
oscillations coded a zero, five coded a one. The output was low-pass filtered. 
You usually had to try loading a program several times, slightly adjusting the 
volume, until you got lucky.

Greets,
Kiste

Am Donnerstag, 24. Februar 2022, 19:56:01 MEZ hat Rob CJ  
Folgendes geschrieben:


Hi Hans,

If I understand you right the only thing you want to do is to record a signal 
or a sequence of signals on a casette player  that can be used to trigger 
something when the recording is played back right?

If my initial suggestion would work - which may work since I have the idea that 
my Apple II did more ore less the same thing - I could give it a try to do a 
proof of concept.

I may have a the problem that I do not have a casette recorder but I could fake 
it by just connecting two PICs to see if that works. The final test could then 
be done by you.

Which PIC type are you using?

Kind regards,

Rob




Van: jal...@googlegroups.com  namens hans 

Verzonden: donderdag 24 februari 2022 17:07
Aan: jallib 
Onderwerp: Re: [jallib] PWM serial audio transmission

Another piece of text:
So far I've done everything with MIDI. I used one midi channel for the actions 
with a general command type. Then 2 data, one for the device nr (16) and one 
for the command. (0-128)
This has worked well for years, but it does require a complete MIDI sound 
package.

Op donderdag 24 februari 2022 om 16:55:46 UTC+1 schreef hans:
Hey ,
I have tried a circuit with an MT8880 but the ICI has failed. I did hear the 16 
tones, but when I wanted to receive them, the chip gave up the ghost.
In theory I understand your suggestions well, but developing something like 
this is not easy for me. I'm just a LEGO builder.
regards
Hans

Op woensdag 23 februari 2022 om 19:30:37 UTC+1 schreef rob...@hotmail.com:
Hi Hans, Kiste,

You can still by DTMF decoders and I assume also DTMF encoders. Just look at 
for example Aliexpress and type DTMF.

But another suggestion. Many, many years ago I had built an Apple II and  I 
used cassette tapes to store and load games which was using tones generated by 
the Apple II itself using two tones, one for high, one for low and one as a 
lead-in tone (not sure in the lead-in tone was another tone) to synchronze the 
start of the recorded program. You would not need this lead-in tone in your case

So I think it may not be that complex:
-) For recording on casette, generate this dual tone by the PIC  via PWM or 
maybe it is also sufficient to generate one tone in case of a 1 and no tone in 
case of a 0 but I think this will be less reliable.
-) For playback, measure the length of the recorded PWM tone. If is is within a 
certain range you accept it as a one and in case of two tones the lower tone 
could be zero and the higher tone is one.

As long as the tone frequency is not too high, I think this could work.

A more advanced solution would be to use a phase locked loop (PLL) but I am not 
sure if it will work. The PLL locks to the input signal so the voltage that 
controls the oscillator goes up and down to follow (lock on to) the input 
signal and this oscillator voltage signal could then be used by a comparator of 
the PIC to detect a high or low tone. You can also 

Re: [jallib] PWM serial audio transmission

2022-02-24 Thread hans
Hi Rob an Kiste,
I'm glad you want to help me. To be clear, except that my aging body is 
also slowing down, the gray knit from above is not so easy anymore. Besides 
the little ones I still have the 16F15325, 18F4455, 18F4550 and 18F4520.
Attached is the program I had made for the DTMF of which the MT8880 was 
killed for info.
regards
Hans

Op donderdag 24 februari 2022 om 21:38:36 UTC+1 schreef Kiste:

> Hi Rob,
>
> connecting two PICs is not like an audio recording. Better connect the pic 
> to your soundcard to record and then playback, that way you'll get 
> something similar to a tape recorder.
>
> The difficulties when using audio equipment are (at least):
>
> - only alternating current is transmitted
> - the volume is never exactly the same
> - the frequency range is limited to like 100Hz-10kHz
> - the line level voltage is less than 1V
>
>  Reading should be possible by most PICs which have comparators. Only a 
> resistor is needed, then you can detect zero crossings. 
>
> The Sinclair ZX81 used audio equipment as storage. A burst of three 
> oscillations coded a zero, five coded a one. The output was low-pass 
> filtered. You usually had to try loading a program several times, slightly 
> adjusting the volume, until you got lucky.
>
> Greets,
> Kiste
>
> Am Donnerstag, 24. Februar 2022, 19:56:01 MEZ hat Rob CJ <
> rob...@hotmail.com> Folgendes geschrieben: 
>
>
> Hi Hans,
>
> If I understand you right the only thing you want to do is to record a 
> signal or a sequence of signals on a casette player  that can be used to 
> trigger something when the recording is played back right?
>
> If my initial suggestion would work - which may work since I have the idea 
> that my Apple II did more ore less the same thing - I could give it a try 
> to do a proof of concept. 
>
> I may have a the problem that I do not have a casette recorder but I could 
> fake it by just connecting two PICs to see if that works. The final test 
> could then be done by you.
>
> Which PIC type are you using?
>
> Kind regards,
>
> Rob
>
>
>
> --
> *Van:* jal...@googlegroups.com  namens hans <
> hansvanve...@gmail.com>
> *Verzonden:* donderdag 24 februari 2022 17:07
> *Aan:* jallib 
> *Onderwerp:* Re: [jallib] PWM serial audio transmission 
>  
> Another piece of text:
> So far I've done everything with MIDI. I used one midi channel for the 
> actions with a general command type. Then 2 data, one for the device nr 
> (16) and one for the command. (0-128)
> This has worked well for years, but it does require a complete MIDI sound 
> package.
>
> Op donderdag 24 februari 2022 om 16:55:46 UTC+1 schreef hans:
>
> Hey ,
> I have tried a circuit with an MT8880 but the ICI has failed. I did hear 
> the 16 tones, but when I wanted to receive them, the chip gave up the ghost.
> In theory I understand your suggestions well, but developing something 
> like this is not easy for me. I'm just a LEGO builder. 
> regards
> Hans
>
> Op woensdag 23 februari 2022 om 19:30:37 UTC+1 schreef rob...@hotmail.com:
>
> Hi Hans, Kiste,
>
> You can still by DTMF decoders and I assume also DTMF encoders. Just look 
> at for example Aliexpress and type DTMF.
>
> But another suggestion. Many, many years ago I had built an Apple II and  
> I used cassette tapes to store and load games which was using tones 
> generated by the Apple II itself using two tones, one for high, one for low 
> and one as a lead-in tone (not sure in the lead-in tone was another tone) 
> to synchronze the start of the recorded program. You would not need this 
> lead-in tone in your case
>
> So I think it may not be that complex:
> -) For recording on casette, generate this dual tone by the PIC  via PWM 
> or maybe it is also sufficient to generate one tone in case of a 1 and no 
> tone in case of a 0 but I think this will be less reliable.
> -) For playback, measure the length of the recorded PWM tone. If is is 
> within a certain range you accept it as a one and in case of two tones the 
> lower tone could be zero and the higher tone is one. 
>
> As long as the tone frequency is not too high, I think this could work.
>
> A more advanced solution would be to use a phase locked loop (PLL) but I 
> am not sure if it will work. The PLL locks to the input signal so the 
> voltage that controls the oscillator goes up and down to follow (lock on 
> to) the input signal and this oscillator voltage signal could then be used 
> by a comparator of the PIC to detect a high or low tone. You can also use 
> the oscillator of the IC to generate the two tones by controlling the 
> oscillator voltage by the PIC. A typical IC for that is the HEF4046. I have 
> used this IC many many years ago too. This solution may be bit over the top 
> since you only want a kind of trigger signal
>
> But maybe the first solution is more doable.  Just give it a try.
>
> Kind regards,
>
> Rob
>
> --
> *Van:* 'Oliver Seitz' via jallib 
> *Verzonden:* woensdag 23 

Re: [jallib] PWM serial audio transmission

2022-02-24 Thread 'Oliver Seitz' via jallib
 Hi Rob,
connecting two PICs is not like an audio recording. Better connect the pic to 
your soundcard to record and then playback, that way you'll get something 
similar to a tape recorder.
The difficulties when using audio equipment are (at least):
- only alternating current is transmitted- the volume is never exactly the 
same- the frequency range is limited to like 100Hz-10kHz- the line level 
voltage is less than 1V
 Reading should be possible by most PICs which have comparators. Only a 
resistor is needed, then you can detect zero crossings. 
The Sinclair ZX81 used audio equipment as storage. A burst of three 
oscillations coded a zero, five coded a one. The output was low-pass filtered. 
You usually had to try loading a program several times, slightly adjusting the 
volume, until you got lucky.
Greets,Kiste
Am Donnerstag, 24. Februar 2022, 19:56:01 MEZ hat Rob CJ 
 Folgendes geschrieben:  
 
 Hi Hans,
If I understand you right the only thing you want to do is to record a signal 
or a sequence of signals on a casette player  that can be used to trigger 
something when the recording is played back right?
If my initial suggestion would work - which may work since I have the idea that 
my Apple II did more ore less the same thing - I could give it a try to do a 
proof of concept. 
I may have a the problem that I do not have a casette recorder but I could fake 
it by just connecting two PICs to see if that works. The final test could then 
be done by you.
Which PIC type are you using?
Kind regards,
Rob


Van: jallib@googlegroups.com  namens hans 

Verzonden: donderdag 24 februari 2022 17:07
Aan: jallib 
Onderwerp: Re: [jallib] PWM serial audio transmission Another piece of text:
So far I've done everything with MIDI. I used one midi channel for the actions 
with a general command type. Then 2 data, one for the device nr (16) and one 
for the command. (0-128)
This has worked well for years, but it does require a complete MIDI sound 
package.

Op donderdag 24 februari 2022 om 16:55:46 UTC+1 schreef hans:

Hey ,
I have tried a circuit with an MT8880 but the ICI has failed. I did hear the 16 
tones, but when I wanted to receive them, the chip gave up the ghost.
In theory I understand your suggestions well, but developing something like 
this is not easy for me. I'm just a LEGO builder.regardsHans

Op woensdag 23 februari 2022 om 19:30:37 UTC+1 schreefrob...@hotmail.com:

Hi Hans, Kiste,
You can still by DTMF decoders and I assume also DTMF encoders. Just look at 
for example Aliexpress and type DTMF.
But another suggestion. Many, many years ago I had built an Apple II and  I 
used cassette tapes to store and load games which was using tones generated by 
the Apple II itself using two tones, one for high, one for low and one as a 
lead-in tone (not sure in the lead-in tone was another tone) to synchronze the 
start of the recorded program. You would not need this lead-in tone in your case
So I think it may not be that complex:-) For recording on casette, generate 
this dual tone by the PIC  via PWM or maybe it is also sufficient to generate 
one tone in case of a 1 and no tone in case of a 0 but I think this will be 
less reliable.-) For playback, measure the length of the recorded PWM tone. If 
is is within a certain range you accept it as a one and in case of two tones 
the lower tone could be zero and the higher tone is one. 
As long as the tone frequency is not too high, I think this could work.
A more advanced solution would be to use a phase locked loop (PLL) but I am not 
sure if it will work. The PLL locks to the input signal so the voltage that 
controls the oscillator goes up and down to follow (lock on to) the input 
signal and this oscillator voltage signal could then be used by a comparator of 
the PIC to detect a high or low tone. You can also use the oscillator of the IC 
to generate the two tones by controlling the oscillator voltage by the PIC. A 
typical IC for that is the HEF4046. I have used this IC many many years ago 
too. This solution may be bit over the top since you only want a kind of 
trigger signal
But maybe the first solution is more doable.  Just give it a try.
Kind regards,
Rob
Van: 'Oliver Seitz' via jallib 
Verzonden: woensdag 23 februari 2022 09:58
Aan: jal...@googlegroups.com 
Onderwerp: Re: [jallib] PWM serial audio transmission Hi Hans,
20 years ago I would have suggested using DTMF, but the decoder chips are rare 
these days...
PIC controllers include various peripherals which can be used to encode and 
decode DC-free signals (which, apart from the frequency below, say, 10kHz, is 
the requirement to be recorded as audio). On/off keying or frequency shift 
keying are the easiest, I think. Which chips are you going to use?
Greets,Kiste
Am Mittwoch, 23. Februar 2022, 09:15:43 MEZ hat hans  
Folgendes geschrieben:

Hello everyone,
I have been trying for a long time to place a serial signal on one track of an 
audio recording which I can read afterwards. To make all 

[jallib] [jallib/jallib] 811be2: Small updates of glcd_ssd1306 and rtc_ds3231 library.

2022-02-24 Thread 'Rob Jansen' via jallib
  Branch: refs/heads/master
  Home:   https://github.com/jallib/jallib
  Commit: 811be221b65ca95a6831b5dfc675208a6945d420
  
https://github.com/jallib/jallib/commit/811be221b65ca95a6831b5dfc675208a6945d420
  Author: Rob Jansen <12682653+robjanse...@users.noreply.github.com>
  Date:   2022-02-24 (Thu, 24 Feb 2022)

  Changed paths:
M include/external/lcd/glcd_ssd1306.jal
M include/external/rtc/rtc_ds3231.jal

  Log Message:
  ---
  Small updates of glcd_ssd1306 and rtc_ds3231 library.

Only define relevant pins when not previously defined. This makes it possible 
to include more libraries that use I2C.


-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jallib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/jallib/jallib/push/refs/heads/master/66bb46-811be2%40github.com.


Re: [jallib] PWM serial audio transmission

2022-02-24 Thread Rob CJ
Hi Hans,

If I understand you right the only thing you want to do is to record a signal 
or a sequence of signals on a casette player  that can be used to trigger 
something when the recording is played back right?

If my initial suggestion would work - which may work since I have the idea that 
my Apple II did more ore less the same thing - I could give it a try to do a 
proof of concept.

I may have a the problem that I do not have a casette recorder but I could fake 
it by just connecting two PICs to see if that works. The final test could then 
be done by you.

Which PIC type are you using?

Kind regards,

Rob




Van: jallib@googlegroups.com  namens hans 

Verzonden: donderdag 24 februari 2022 17:07
Aan: jallib 
Onderwerp: Re: [jallib] PWM serial audio transmission

Another piece of text:
So far I've done everything with MIDI. I used one midi channel for the actions 
with a general command type. Then 2 data, one for the device nr (16) and one 
for the command. (0-128)
This has worked well for years, but it does require a complete MIDI sound 
package.

Op donderdag 24 februari 2022 om 16:55:46 UTC+1 schreef hans:
Hey ,
I have tried a circuit with an MT8880 but the ICI has failed. I did hear the 16 
tones, but when I wanted to receive them, the chip gave up the ghost.
In theory I understand your suggestions well, but developing something like 
this is not easy for me. I'm just a LEGO builder.
regards
Hans

Op woensdag 23 februari 2022 om 19:30:37 UTC+1 schreef rob...@hotmail.com:
Hi Hans, Kiste,

You can still by DTMF decoders and I assume also DTMF encoders. Just look at 
for example Aliexpress and type DTMF.

But another suggestion. Many, many years ago I had built an Apple II and  I 
used cassette tapes to store and load games which was using tones generated by 
the Apple II itself using two tones, one for high, one for low and one as a 
lead-in tone (not sure in the lead-in tone was another tone) to synchronze the 
start of the recorded program. You would not need this lead-in tone in your case

So I think it may not be that complex:
-) For recording on casette, generate this dual tone by the PIC  via PWM or 
maybe it is also sufficient to generate one tone in case of a 1 and no tone in 
case of a 0 but I think this will be less reliable.
-) For playback, measure the length of the recorded PWM tone. If is is within a 
certain range you accept it as a one and in case of two tones the lower tone 
could be zero and the higher tone is one.

As long as the tone frequency is not too high, I think this could work.

A more advanced solution would be to use a phase locked loop (PLL) but I am not 
sure if it will work. The PLL locks to the input signal so the voltage that 
controls the oscillator goes up and down to follow (lock on to) the input 
signal and this oscillator voltage signal could then be used by a comparator of 
the PIC to detect a high or low tone. You can also use the oscillator of the IC 
to generate the two tones by controlling the oscillator voltage by the PIC. A 
typical IC for that is the HEF4046. I have used this IC many many years ago 
too. This solution may be bit over the top since you only want a kind of 
trigger signal

But maybe the first solution is more doable.  Just give it a try.

Kind regards,

Rob


Van: 'Oliver Seitz' via jallib 
Verzonden: woensdag 23 februari 2022 09:58
Aan: jal...@googlegroups.com 
Onderwerp: Re: [jallib] PWM serial audio transmission

Hi Hans,

20 years ago I would have suggested using DTMF, but the decoder chips are rare 
these days...

PIC controllers include various peripherals which can be used to encode and 
decode DC-free signals (which, apart from the frequency below, say, 10kHz, is 
the requirement to be recorded as audio). On/off keying or frequency shift 
keying are the easiest, I think. Which chips are you going to use?

Greets,
Kiste

Am Mittwoch, 23. Februar 2022, 09:15:43 MEZ hat hans  
Folgendes geschrieben:


Hello everyone,
I have been trying for a long time to place a serial signal on one track of an 
audio recording which I can read afterwards. To make all kinds of things happen 
at the same time as the audio is played. I have now tried to do this with the 
old modem system ( TCM3105) but it failed hopelessly. I read that there are 
also systems to do this using PWM. Does anyone have an idea?
regards
Hans

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jallib+un...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/773ca37b-9bed-4349-a8eb-32a5d8973df6n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.

Re: [jallib] PWM serial audio transmission

2022-02-24 Thread hans
Another piece of text:
So far I've done everything with MIDI. I used one midi channel for the 
actions with a general command type. Then 2 data, one for the device nr 
(16) and one for the command. (0-128)
This has worked well for years, but it does require a complete MIDI sound 
package.

Op donderdag 24 februari 2022 om 16:55:46 UTC+1 schreef hans:

> Hey ,
> I have tried a circuit with an MT8880 but the ICI has failed. I did hear 
> the 16 tones, but when I wanted to receive them, the chip gave up the ghost.
> In theory I understand your suggestions well, but developing something 
> like this is not easy for me. I'm just a LEGO builder.
> regards
> Hans
>
> Op woensdag 23 februari 2022 om 19:30:37 UTC+1 schreef rob...@hotmail.com:
>
>> Hi Hans, Kiste,
>>
>> You can still by DTMF decoders and I assume also DTMF encoders. Just look 
>> at for example Aliexpress and type DTMF.
>>
>> But another suggestion. Many, many years ago I had built an Apple II and  
>> I used cassette tapes to store and load games which was using tones 
>> generated by the Apple II itself using two tones, one for high, one for low 
>> and one as a lead-in tone (not sure in the lead-in tone was another tone) 
>> to synchronze the start of the recorded program. You would not need this 
>> lead-in tone in your case
>>
>> So I think it may not be that complex:
>> -) For recording on casette, generate this dual tone by the PIC  via PWM 
>> or maybe it is also sufficient to generate one tone in case of a 1 and no 
>> tone in case of a 0 but I think this will be less reliable.
>> -) For playback, measure the length of the recorded PWM tone. If is is 
>> within a certain range you accept it as a one and in case of two tones the 
>> lower tone could be zero and the higher tone is one. 
>>
>> As long as the tone frequency is not too high, I think this could work.
>>
>> A more advanced solution would be to use a phase locked loop (PLL) but I 
>> am not sure if it will work. The PLL locks to the input signal so the 
>> voltage that controls the oscillator goes up and down to follow (lock on 
>> to) the input signal and this oscillator voltage signal could then be used 
>> by a comparator of the PIC to detect a high or low tone. You can also use 
>> the oscillator of the IC to generate the two tones by controlling the 
>> oscillator voltage by the PIC. A typical IC for that is the HEF4046. I have 
>> used this IC many many years ago too. This solution may be bit over the top 
>> since you only want a kind of trigger signal
>>
>> But maybe the first solution is more doable.  Just give it a try.
>>
>> Kind regards,
>>
>> Rob
>>
>> --
>> *Van:* 'Oliver Seitz' via jallib 
>> *Verzonden:* woensdag 23 februari 2022 09:58
>> *Aan:* jal...@googlegroups.com 
>> *Onderwerp:* Re: [jallib] PWM serial audio transmission 
>>  
>> Hi Hans,
>>
>> 20 years ago I would have suggested using DTMF, but the decoder chips are 
>> rare these days...
>>
>> PIC controllers include various peripherals which can be used to encode 
>> and decode DC-free signals (which, apart from the frequency below, say, 
>> 10kHz, is the requirement to be recorded as audio). On/off keying or 
>> frequency shift keying are the easiest, I think. Which chips are you going 
>> to use?
>>
>> Greets,
>> Kiste
>>
>> Am Mittwoch, 23. Februar 2022, 09:15:43 MEZ hat hans <
>> hansvanve...@gmail.com> Folgendes geschrieben: 
>>
>>
>> Hello everyone,
>> I have been trying for a long time to place a serial signal on one track 
>> of an audio recording which I can read afterwards. To make all kinds of 
>> things happen at the same time as the audio is played. I have now tried to 
>> do this with the old modem system ( TCM3105) but it failed hopelessly. I 
>> read that there are also systems to do this using PWM. Does anyone have an 
>> idea?
>> regards
>> Hans
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jallib" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jallib+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jallib/773ca37b-9bed-4349-a8eb-32a5d8973df6n%40googlegroups.com
>>  
>> 
>> .
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jallib" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jallib+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jallib/201142693.752814.1645606718467%40mail.yahoo.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe 

Re: [jallib] PWM serial audio transmission

2022-02-24 Thread hans
Hey ,
I have tried a circuit with an MT8880 but the ICI has failed. I did hear 
the 16 tones, but when I wanted to receive them, the chip gave up the ghost.
In theory I understand your suggestions well, but developing something like 
this is not easy for me. I'm just a LEGO builder.
regards
Hans

Op woensdag 23 februari 2022 om 19:30:37 UTC+1 schreef rob...@hotmail.com:

> Hi Hans, Kiste,
>
> You can still by DTMF decoders and I assume also DTMF encoders. Just look 
> at for example Aliexpress and type DTMF.
>
> But another suggestion. Many, many years ago I had built an Apple II and  
> I used cassette tapes to store and load games which was using tones 
> generated by the Apple II itself using two tones, one for high, one for low 
> and one as a lead-in tone (not sure in the lead-in tone was another tone) 
> to synchronze the start of the recorded program. You would not need this 
> lead-in tone in your case
>
> So I think it may not be that complex:
> -) For recording on casette, generate this dual tone by the PIC  via PWM 
> or maybe it is also sufficient to generate one tone in case of a 1 and no 
> tone in case of a 0 but I think this will be less reliable.
> -) For playback, measure the length of the recorded PWM tone. If is is 
> within a certain range you accept it as a one and in case of two tones the 
> lower tone could be zero and the higher tone is one. 
>
> As long as the tone frequency is not too high, I think this could work.
>
> A more advanced solution would be to use a phase locked loop (PLL) but I 
> am not sure if it will work. The PLL locks to the input signal so the 
> voltage that controls the oscillator goes up and down to follow (lock on 
> to) the input signal and this oscillator voltage signal could then be used 
> by a comparator of the PIC to detect a high or low tone. You can also use 
> the oscillator of the IC to generate the two tones by controlling the 
> oscillator voltage by the PIC. A typical IC for that is the HEF4046. I have 
> used this IC many many years ago too. This solution may be bit over the top 
> since you only want a kind of trigger signal
>
> But maybe the first solution is more doable.  Just give it a try.
>
> Kind regards,
>
> Rob
>
> --
> *Van:* 'Oliver Seitz' via jallib 
> *Verzonden:* woensdag 23 februari 2022 09:58
> *Aan:* jal...@googlegroups.com 
> *Onderwerp:* Re: [jallib] PWM serial audio transmission 
>  
> Hi Hans,
>
> 20 years ago I would have suggested using DTMF, but the decoder chips are 
> rare these days...
>
> PIC controllers include various peripherals which can be used to encode 
> and decode DC-free signals (which, apart from the frequency below, say, 
> 10kHz, is the requirement to be recorded as audio). On/off keying or 
> frequency shift keying are the easiest, I think. Which chips are you going 
> to use?
>
> Greets,
> Kiste
>
> Am Mittwoch, 23. Februar 2022, 09:15:43 MEZ hat hans <
> hansvanve...@gmail.com> Folgendes geschrieben: 
>
>
> Hello everyone,
> I have been trying for a long time to place a serial signal on one track 
> of an audio recording which I can read afterwards. To make all kinds of 
> things happen at the same time as the audio is played. I have now tried to 
> do this with the old modem system ( TCM3105) but it failed hopelessly. I 
> read that there are also systems to do this using PWM. Does anyone have an 
> idea?
> regards
> Hans
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jallib+un...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/773ca37b-9bed-4349-a8eb-32a5d8973df6n%40googlegroups.com
>  
> 
> .
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jallib+un...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jallib/201142693.752814.1645606718467%40mail.yahoo.com
>  
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jallib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/94527fb5-d985-481c-b7c2-874c09a6286en%40googlegroups.com.