0
\$\begingroup\$

So as mentioned in the title I have to generate a certain custom EBU time code using verilog, I have found this website that explains time-code systems and it's properties,but the problem is i can't understand parts of it so I can actually proceed to coding it (so my question is about the concept of the EBU time-code itself and not coding it in verilog , so if someone that understands it would clarify the parts i write in bold , I would really appreciate it).

http://www.philrees.co.uk/articles/timecode.htm

The data organisation of the SMPTE LTC frame The datastream for each video frame of Longitudinal TimeCode consists of eighty bit-periods (bit cells). At the original American frame-rate of 30 fps, the bit rate would work out to 30 x 80, that is 2400 bits per second. The frequency for a stream of zeros would be 1.2 kHz and for a stream of ones it would be 2.4 kHz. The corresponding bit rate for the European 25 fps frame-rate is 2000 bits per second. in this case, the frequency for a stream of zeros would be 1.0 kHz and for a stream of ones it would be 2.0 kHz. All these frequencies are safely within the audio range, so the SMPTE LTC sync tone waveform can be recorded easily on any half decent audio track.

enter image description here

In each frame, twenty six of the eighty bits carry the SMPTE time or 'address', in binary coded decimal. In the diagram above, these Bits are shown as FRAME UNITS, FRAME TENS, SECS UNITS, SECS TENS, MINS UNITS, MINS TENS, HOURS UNITS and HOURS TENS. The BCD digits are loaded 'least significant bit first'.

first , I get that the second and minute and hour of the time-code is seperated to two BCD single digit codes , meaning this 17:28:49 (HH:MM:SS) will be like this :
SECS UNITS = 9
SECS TENS = 4
MINS UNITS = 8
MINS TENS = 2
HOURS UNITS = 7
HOURS TENS = 1
but what does the FRAME UNITS, FRAME TENS refers to? does it refer to the frame number , if so how can FRAME TENS be only 2 bits? The BCD digits are loaded 'least significant bit first'. does this affect how I generate the frame , or this refers to a Time-code reader?

Thirty two bits are assigned as eight groups of four USER BITS, also sometimes called the "Binary Groups". This capacity is generally used to carry extra info such as reel number and date. The User Bits may be allocated howsoever one wishes as long as both Binary Group Flag Bits are cleared. The User Bits do not usually vary in the course of a timecode stream.

This capacity is generally used to carry extra info such as reel number and date. this is mentioned but does not specify how to put the dates and reel numbers on to those eight groups.

The last sixteen Bits make up the SYNC WORD. A timecode reader uses these Bits to find the frame boundary, the tape direction, and the bit-rate of the sync tone. The values of these Bits are fixed as 0011 1111 1111 1101 .

The values of these Bits are fixed as 0011 1111 1111 1101 . so i should put the last 16 bits of my time-code as 0011 1111 1111 1101 too? or should be different? there is no more specification regarding this

The Bi-Phase Mark Phase Correction Bit bPMPC is Bit 27. This bit may be set or cleared in order that every 80-bit word contains an even number of zeroes. This means that the phase (or logical sense) of the pulse train in every Sync Word will be the same. As the LTC standard evolved, during the 1980's, timecode was being heavily used in 1" video editing. Many of the early processor systems used to synchronize the playback and record machines to an editor required that the timecode Sync Word to be properly timed to the vertical interval (per the spec). However, because of tracking (or other interchange) problems with some tapes, it was necessary to manually track those tapes for optimum playback. At the same time, not all VTRs were equipped with timecode boards, and not all of those that did performed a regeneration of the off-tape timecode (which provides a properly phased and shaped signal to the outside world). As a consequence, as the tracking was varied, the timing relationship of the Sync Word varied as well. Much to the dismay of many editors and tape operators (spoolers), it was learned too late that the timecode readers in the editor could be off by a frame if the tracking was moved too far away from spec. The Ampex VPR-2/2B, the work-horse of the industry at the time, had a timecode waveform display. Using it to verify the position of sync word was complicated by the constant toggling of the polarity of the waveform due to the varying number of zero's per frame. The Bi-Phase Mark Bit was added to make finding the Sync Word visibly easier. By the time the standard was fully adopted, most newer machines had already incorporated the regeneration feature which made the Bi-Phase Mark Bit obsolete. Prior to the standard being adopted, Sony on the BVH-2000 had implemented a phase correction bit in one of the User Bits - this machine also had a timecode waveform display.

The Bi-Phase Mark Phase Correction Bit bPMPC is Bit 27. This bit may be set or cleared in order that every 80-bit word contains an even number of zeroes. I did not undrstand this paragraph at all, what should I do with bit 27 in my time-code?

Bit 58 is not required for the BCD count for HOURS TENS (which has a maximum value of two) and has not been given any other special purpose so remains unassigned. This Bit has been RESERVED for future assignment.

Bit 58 is not required for the BCD count for HOURS TENS (which has a maximum value of two) and has not been given any other special purpose so remains unassigned. this bit should be assigned 0 automatically as far as I understood.

Bits 43 and 59 are assigned as the Binary Group Flag Bits bGFb. These Bits are used to indicate when a standard character set is used to format the User Bits data. The Binary Group Flag Bits should be used only as shown in the truth table below. The Unassigned entries in the table should not be used, as they may be allocated specific meanings in the future.

enter image description here

Bits 43 and 59 are assigned as the Binary Group Flag Bits bGFb. These Bits are used to indicate when a standard character set is used to format the User Bits data. so I should assign both of these 0 , right?

NOTE : All of my questions are regarding to the EBU format with 25 frames per second , I am not asking for help in coding this , I just don't understand the Time-code itself , so I just need some clarifications. This is something I have to do myself , I can't use any configured or mass-produced hardwares/softwares.

\$\endgroup\$
  • \$\begingroup\$ This might not even relate much to electrical engineering, if you just need to understand the specs. The website that you linked to does quite good job at it, have you thoroughly read it? \$\endgroup\$ – Justme Sep 19 '20 at 18:54
  • \$\begingroup\$ @Justme I did , as You can see some parts I understood and had no question about , some parts I was unsure about , and some parts I did not understand any of it. and yes I know , but since the electrical engineering has the electronic enginering in it's description , I hoped it might get answers here , for that matter I don't think I can post it anywhere else. \$\endgroup\$ – Hitman2847 Sep 19 '20 at 18:56
1
\$\begingroup\$

what does the FRAME UNITS, FRAME TENS refers to?

The frame number. Frame 14 would have 1 as frame tens, and 4 as frame units.

how can it be each only 4bits?

It isn't, the frame units is 4 bits, so they can go from 0 to 9, and frame tens is 2 bits, so it can go from 0 to 3. Frame count can thus be from 00 to 39.

The BCD digits are loaded 'least significant bit first'.

Yes, so if you want to transmit number 8, which is 1000 in binary, it would be transmitted out as 0001, the least significant bits first, and the most significant bits last.

This capacity is generally used to carry extra info such as reel number and date. this is mentioned but does not specify how to put the dates and reel numbers on to those eight groups

It is mentioned, you quoted it yourself : "The User Bits may be allocated howsoever one wishes as long as both Binary Group Flag Bits are cleared.", so you are free to put anything you want there. There are eight groups of 4 bits, so 8 BCD digits, or 4 bytes, or 32 bits.

The values of these Bits are fixed as 0011 1111 1111 1101 . so i should put the last 16 bits of my time-code as 0011 1111 1111 1101 too?

Yes, it is a fixed sync word. If it is not that sequence, it won't be a valid timecode transmission.

The Bi-Phase Mark Phase Correction Bit bPMPC is Bit 27. This bit may be set or cleared in order that every 80-bit word contains an even number of zeroes. I did not undrstand this paragraph at all, what should I do with bit 27 in my time-code?

It's a parity bit. If you have sent 79 bits of data, and the count of sent zero bits is odd, the parity bit is set to zero to have even number of sent zero bits.

Bit 58 is not required for the BCD count for HOURS TENS (which has a maximum value of two) and has not been given any other special purpose so remains unassigned. this bit should be assigned 0 automatically as far as I understood.

It is unassigned for any purpose. It can be assigned to some special purpose in the future, so yes, it is best to send it as 0.

Bits 43 and 59 are assigned as the Binary Group Flag Bits bGFb. These Bits are used to indicate when a standard character set is used to format the User Bits data. so I should assign both of these 0 , right?

If you don't have a specific format for user bits, yes, both of these should be set to 0.

\$\endgroup\$
  • \$\begingroup\$ Finally, thanks so much , i have been waiting for an acceptable answer so I can start coding it , you have my utmost gratitude. just to be sure I can send the user bits all as 0000 if there is no need to input any date and reel number? what if i had to input those, any specific order which user bit translates to what? and as for the bit 27 which you mentioned that works like a parity bit , as I understood I should include a piece of code to check the number of zeros (if I got it right) and if there are odd number of zeros the bit 27 would be 0, but if there is an even number of zeros, it is 1. \$\endgroup\$ – Hitman2847 Sep 19 '20 at 19:29
  • \$\begingroup\$ Yes, sending zero as user data should be just as valid as sending any other user data. The user data can be sent or interpreted in any way, so it is up to the implementation. Most likely first user data 1 would be leftmost BCD digit and last user data 8 would be rightmost BCD digit, but who knows. If it was binary, I would personally set user data 1 to be the least significant 4 bits of the 32, and user data 8 to be the most significant bits of the 32, as these timecodes are sent least significant digit first (units) and then most significant digit next (tens). \$\endgroup\$ – Justme Sep 19 '20 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.