VOGONS


Project: Full Can Clock Oscillator Replacement

Topic actions

Reply 40 of 124, by feipoa

User metadata
Rank l33t++
Rank
l33t++

Unfortunately, it looks like the ATtiny85 has only 512 bytes of SRAM. Using the standard Adafruit supplied libraries for the SI5351, the sketch required to set the frequency on the SI5351 (which is only a dozen lines of code), uses 572 byes of SRAM and 6402 bytes of flash.

The Nano, which uses the Mega328P, would work, but I cannot envision the required components fitting on a PCB the size of a 386's crystal oscillator. The USB components take up a lot of space. If they are ditched, and if we use a second Arduino to programme the flash on the Mega328P board, maybe it fits. We'd have to stack the two PCB's.

To offer some size comparison between the Mega328P and wiretap's PCB, see:

The attachment Mega328P_and_full_can_repalcement_PCB.JPG is no longer available

However, if already designing another PCB to serve as the top microcontroller layer, wouldn't it be better to source an alternative to the SI5351, one which allows for the NVRAM to be easily written to, or better yet, one which automatically retains every last code programmed to it in eeprom?

Another idea might be to add a 3V battery backup to the existing PCB. How long would it last?

Plan your life wisely, you'll be dead before you know it.

Reply 41 of 124, by weedeewee

User metadata
Rank l33t
Rank
l33t
feipoa wrote on 2024-06-28, 10:24:

Unfortunately, it looks like the ATtiny85 has only 512 bytes of SRAM. Using the standard Adafruit supplied libraries for the SI5351, the sketch required to set the frequency on the SI5351 (which is only a dozen lines of code), uses 572 byes of SRAM and 6402 bytes of flash.

Seems odd. then again what do I know.
how much sram usage to load the config from an I2C nvram and dump that to the si5351 ?

The Nano, which uses the Mega328P, would work, but I cannot envision the required components fitting on a PCB the size of a 386' […]
Show full quote

The Nano, which uses the Mega328P, would work, but I cannot envision the required components fitting on a PCB the size of a 386's crystal oscillator. The USB components take up a lot of space. If they are ditched, and if we use a second Arduino to programme the flash on the Mega328P board, maybe it fits. We'd have to stack the two PCB's.

To offer some size comparison between the Mega328P and wiretap's PCB, see:
Mega328P_and_full_can_repalcement_PCB.JPG

However, if already designing another PCB to serve as the top microcontroller layer, wouldn't it be better to source an alternative to the SI5351, one which allows for the NVRAM to be easily written to, or better yet, one which automatically retains every last code programmed to it in eeprom?

Another idea might be to add a 3V battery backup to the existing PCB. How long would it last?

According to the numbers in the datasheet, given a CR2032, a few hours to a day or two. Probably longer if you could disable the outputs on the si5351 when the computer is off.... 😒
I was thinking, if you're using an atx power supply, you could use the +5V Standby rail.

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 42 of 124, by rasz_pl

User metadata
Rank l33t
Rank
l33t
feipoa wrote on 2024-06-28, 10:24:

Unfortunately, it looks like the ATtiny85 has only 512 bytes of SRAM. Using the standard Adafruit supplied libraries for the SI5351, the sketch required to set the frequency on the SI5351 (which is only a dozen lines of code), uses 572 byes of SRAM and 6402 bytes of flash.

adafruit library is for big arduinos, lazy programming. 10 bytes of ram I would understand, but 500? 😮 try https://github.com/riyas-org/tiny5351
In the minimal version (no frequency switching) all you want is to send 8 bytes over I2C, but even adding lcd and 2 buttons/rotary encoder is trivial.
Imagine someone arguing with you they need Windows 95 installed to format floppy - this is what is happening now 😀

feipoa wrote on 2024-06-28, 10:24:

To offer some size comparison between the Mega328P and wiretap's PCB, see:

NANO is small and could be soldered perpendicularly 😀 I dont see the reason to use big arduinos for anything but prototyping.

feipoa wrote on 2024-06-28, 10:24:

However, if already designing another PCB to serve as the top microcontroller layer, wouldn't it be better to source an alternative to the SI5351, one which allows for the NVRAM to be easily written to

Have you found one?

feipoa wrote on 2024-06-28, 10:24:

, or better yet, one which automatically retains every last code programmed to it in eeprom?

NVRAM is EEPROM

feipoa wrote on 2024-06-28, 10:24:

Another idea might be to add a 3V battery backup to the existing PCB. How long would it last?

chip generating almost 100MHz on small battery? maybe couple hours
Attiny85 are even sold in DIP package at crazy $2 premium, $.25 per pin for soldering challenged. You really dont need anything else apart from the chip, it has internal clock, internal reset and 6 IO pins to do whatever you like. 30 years ago it would be single program PIC12C508 used to perform similar tasks, for example Playstation modchips.

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 43 of 124, by feipoa

User metadata
Rank l33t++
Rank
l33t++
rasz_pl wrote on 2024-06-28, 15:53:
adafruit library is for big arduinos, lazy programming. 10 bytes of ram I would understand, but 500? :o try https://github.com/ […]
Show full quote
feipoa wrote on 2024-06-28, 10:24:

Unfortunately, it looks like the ATtiny85 has only 512 bytes of SRAM. Using the standard Adafruit supplied libraries for the SI5351, the sketch required to set the frequency on the SI5351 (which is only a dozen lines of code), uses 572 byes of SRAM and 6402 bytes of flash.

adafruit library is for big arduinos, lazy programming. 10 bytes of ram I would understand, but 500? :o try https://github.com/riyas-org/tiny5351
In the minimal version (no frequency switching) all you want is to send 8 bytes over I2C, but even adding lcd and 2 buttons/rotary encoder is trivial.
Imagine someone arguing with you they need Windows 95 installed to format floppy - this is what is happening now :-)

Yes, essential library constituents can likely be extracted and a sketch made to conform to the 512K SRAM requirement of the ATtiny85. Takes time. Not sure if I'm willing to put in the time at this point - we don't have a modified PCB design that accommodates the ATtiny85.

I haven't programmed these without the USB component before, but here's a tutorial to programme a ATtiny85 with an Arduino Uno, https://www.instructables.com/How-to-Program- … an-Arduino-Uno/. If someone is wanting to adapt wiretap's design to accommodate the ATtiny85, I'd play around with code shrinkage. However, at this stage, I think it prudent to ensure that the existing PCB from wiretap functions in 386 boards. I will assemble one once my level shifters arrive.

rasz_pl wrote on 2024-06-28, 15:53:
feipoa wrote on 2024-06-28, 10:24:

However, if already designing another PCB to serve as the top microcontroller layer, wouldn't it be better to source an alternative to the SI5351, one which allows for the NVRAM to be easily written to

Have you found one?

I haven't started looking yet. Busy with other things, but I'll eventually get to it. I went into this thread thinking everything was ready to go and all I had to do was solder on some parts. I'll be working on my old car for the next bit, then doing camping trips. Kids aren't in school starting today.

rasz_pl wrote on 2024-06-28, 15:53:
feipoa wrote on 2024-06-28, 10:24:

, or better yet, one which automatically retains every last code programmed to it in eeprom?

NVRAM is EEPROM

According to the SI5351 datasheet, the NVRAM is one time programmable. I don't normally refer to this as EEPROM, but rather, EPROM. I was hoping for an alternate PLL which contains NVRAM that can be re-written, not just OTP. I'd settle for OTP if that was all that was available.

rasz_pl wrote on 2024-06-28, 15:53:
feipoa wrote on 2024-06-28, 10:24:

Another idea might be to add a 3V battery backup to the existing PCB. How long would it last?

chip generating almost 100MHz on small battery? maybe couple hours
Attiny85 are even sold in DIP package at crazy $2 premium, $.25 per pin for soldering challenged. You really dont need anything else apart from the chip, it has internal clock, internal reset and 6 IO pins to do whatever you like. 30 years ago it would be single program PIC12C508 used to perform similar tasks, for example Playstation modchips.

The DIP would make speed things up a bit, but takes space. If needing to sandwich two PCBs anyway, then it may be worth considering.

Plan your life wisely, you'll be dead before you know it.

Reply 44 of 124, by rasz_pl

User metadata
Rank l33t
Rank
l33t
feipoa wrote on 2024-06-29, 02:41:

Yes, essential library constituents can likely be extracted and a sketch made to conform to the 512K SRAM requirement of the ATtiny85. Takes time.

Cmon work with me here, click on links I throw at you 😀
https://github.com/riyas-org/tiny5351
"There is an example sketch (tinypll - takes around 960 bytes of flash), just upload via an isp programmer (usbasp) and generates a signal at 10MHZ and can be adjusted a few khz upward by applyng a voltage (0-vcc) on ADC3 of the attiny13"
Even slicker - instead of buttons takes a potentiometer for regulation.
https://github.com/riyas-org/tiny5351/blob/ma … pll/tinypll.ino whole 60 lines where 1/4 of it is for compatibility with ATmega328P
The "adjusted a few khz upward" can be changed in the sketch to offer any frequency scale and range, its this one liner:

si5351_freq(frequency+(t<<7), 0); //multiply adc value with 128 0-1023 becomes 0-(1023*128)
feipoa wrote on 2024-06-29, 02:41:

Not sure if I'm willing to put in the time at this point

does " just upload via an isp programmer (usbasp) and generates a signal" constitute too hard and time consuming?

feipoa wrote on 2024-06-29, 02:41:

- we don't have a modified PCB design that accommodates the ATtiny85.

thats why I keep telling you: with attiny you DONT NEED a pcb, you can solder bare chip with 4 wires, power ground I2c clock data and you are set!

feipoa wrote on 2024-06-29, 02:41:
rasz_pl wrote on 2024-06-28, 15:53:

Have you found one?

I haven't started looking yet.

It was a rhetorical question 😀 It might be just an upsell like Intel selling Xeons at multiple the price despite lots of models being normal desktop dies. Manufacturers are using programming as a carrot (and NDA a stick) to get big design wins.

rasz_pl wrote on 2024-06-28, 15:53:

According to the SI5351 datasheet, the NVRAM is one time programmable. I don't normally refer to this as EEPROM, but rather, EPROM. I was hoping for an alternate PLL which contains NVRAM that can be re-written, not just OTP. I'd settle for OTP if that was all that was available.

or it can be ITAR (aka Iranian drones etc)
Here is a story about a clock chip from another manufacturer https://www.bunniestudios.com/blog/2021/fixin … e-supply-chain/
SiTime SiT8021 MEMS-based silicon resonators that "can outperform quartz crystals in almost every way" https://www.digikey.com/en/products/detail/si … 000000/13675478 $0.6 and custom frequency programmable, but again under NDA and only supplier has the machine to program those.

TLDR: some "export compliance issue... subject to ITAR restrictions", its possible all fast/accurate beyond some level programmable PLLs have those restrictions.

feipoa wrote on 2024-06-28, 10:24:

The DIP would make speed things up a bit, but takes space. If needing to sandwich two PCBs anyway, then it may be worth considering.

You dont need a pcb for a small chip you will connect with 4 wires. Its like saying you need another PCB to solder a connector for a reset button 😀

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 45 of 124, by feipoa

User metadata
Rank l33t++
Rank
l33t++
rasz_pl wrote on 2024-06-29, 13:53:

Cmon work with me here, click on links I throw at you :)

I'll be happy to work with you when I have more time to devote to this, which is Fall at the earliest. At which point, I feel the best order of operation would be:

1) assemble wiretap's PCB. set for 80 or 90 Mhz w/Arduino dangling about it. If it works, then remove the Arduino while live; ensure it still works. If these cases fail, or the motherboard is unstable compared with a transitional crystal oscillator, I don't see what value there would be in proceeding. Another user here has tested one of these home brewed crystal oscillator alternatives and found his system was unstable when the motherboard was overclocked with the home brewed solution, yet performed fine overclocked with a traditional crystal oscillator.

I hope to at least test 1) before the fall.

2) If 1) is successful, then either:

a) look into getting a Tiny or whatever minimalistic microcontroller chip to dangle or glue above the PCB, ensure the MC can be easily programmed, then re-test. If it tests good and is easy enough to replicate, request OP for a PCB redesign to incorporate the microcontroller. This design is supposed to be a simple plug-in replacement for 386 crystal oscillators. Needing to have some components dangling or glued somewhere isn't very elegant and would probably limit desire for this product. If the product is only to be used for test bed purposes, then we don't need to do anything further than 1), just connect any large microcontroller.

b) this is my preference, source another PLL that has EEPROM or OTP EPROM built-in and is consumer programmable, thus bypassing the mess of incorporating a microcontroller to circumvent the limitations of the SI5351.

Plan your life wisely, you'll be dead before you know it.

Reply 47 of 124, by feipoa

User metadata
Rank l33t++
Rank
l33t++
pshipkov wrote on 2024-07-03, 17:58:

I assume you are referring to me in your #1.

yup

pshipkov wrote on 2024-07-03, 17:58:

Not sure about the practicality of the above options in terms of casual and time-constrained hobby.

My first thought when I saw this thread was that this unit was ready to go, all I had to do was programme it once with my arudino, and done. But turns out, it needs to be programmed every power cycle. OK for testbed, not great for in-system. It would be fine with a more suitable PLL or a PCB redesign w/microcontroller (assuming it fits), however, not sure if incorporating a MC will add unwanted effects to the clock signal.

pshipkov wrote on 2024-07-03, 17:58:

I think this approach is more on the right path https://www.youtube.com/watch?v=iqokUHfbWrc

My first thought is: can you get a stable sinusoid in the 100 MHz range from a 555? Last time I used a 555 it was for sub-MHz range.

Plan your life wisely, you'll be dead before you know it.

Reply 48 of 124, by pshipkov

User metadata
Rank l33t
Rank
l33t

Exactly my thought. Ok for testbench, not useful for other stuff. Even for testbench is questionable.
Continuous recompile for a value change, upload, reset system. Repeat. Repeat. …

To your last note - thats the 10 dollars question.
Needs surveillance what components can do it.

retro bits and bytes

Reply 49 of 124, by rasz_pl

User metadata
Rank l33t
Rank
l33t
feipoa wrote on 2024-06-30, 10:33:
rasz_pl wrote on 2024-06-29, 13:53:

Cmon work with me here, click on links I throw at you 😀

I'll be happy to work with you when I have more time to devote to this

I mean, I linked you the solution, but instead of reading it you keep wondering how to solve something already solved ...

feipoa wrote on 2024-06-30, 10:33:

1) assemble wiretap's PCB. set for 80 or 90 Mhz w/Arduino dangling about it. If it works, then remove the Arduino while live; ensure it still works. If these cases fail

why would it fail? The only source of trobuel would be insistence on buffer chip between and using something unsuitable for 100MHz clock speeds

feipoa wrote on 2024-06-30, 10:33:

My first thought when I saw this thread was that this unit was ready to go

did wiretap say that when posting pcbs? that would be weird

feipoa wrote on 2024-06-30, 10:33:

however, not sure if incorporating a MC will add unwanted effects to the clock signal.

it wont

pshipkov wrote on 2024-07-03, 17:58:

I think this approach is more on the right path https://www.youtube.com/watch?v=iqokUHfbWrc

Yes, for a specific use case being teenager learning about pwm 😀

pshipkov wrote on 2024-07-03, 20:41:

Continuous recompile for a value change, upload, reset system. Repeat. Repeat. …

???? https://github.com/riyas-org/tiny5351

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 50 of 124, by weedeewee

User metadata
Rank l33t
Rank
l33t
rasz_pl wrote on 2024-07-03, 23:07:
pshipkov wrote on 2024-07-03, 20:41:

Continuous recompile for a value change, upload, reset system. Repeat. Repeat. …

???? https://github.com/riyas-org/tiny5351

Got anything that goes from 1MHz to 100MHz? I'm too lazy to google for it and have a headache at the moment.

Also, why would a sine wave be a requirement ?

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 51 of 124, by rasz_pl

User metadata
Rank l33t
Rank
l33t
weedeewee wrote on 2024-07-04, 15:35:
rasz_pl wrote on 2024-07-03, 23:07:
pshipkov wrote on 2024-07-03, 20:41:

Continuous recompile for a value change, upload, reset system. Repeat. Repeat. …

???? https://github.com/riyas-org/tiny5351

Got anything that goes from 1MHz to 100MHz?

you are looking at it, >8KHz to <150 MHz, three outputs so can also feed independent ISA/PCI clocks

weedeewee wrote on 2024-07-04, 15:35:

Also, why would a sine wave be a requirement ?

exactly, why would it?

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 52 of 124, by weedeewee

User metadata
Rank l33t
Rank
l33t
rasz_pl wrote on 2024-07-04, 17:24:
weedeewee wrote on 2024-07-04, 15:35:
rasz_pl wrote on 2024-07-03, 23:07:

Got anything that goes from 1MHz to 100MHz?

you are looking at it, >8KHz to <150 MHz, three outputs so can also feed independent ISA/PCI clocks

Dangit, I was mislead by the last line

generates a signal at 10MHZ and can be adjusted a few khz upward

and took it to mean that's all.
and I wrongly thought that it was a microcontroller generated signal, not a microcontroller programming a clock generator.

weedeewee wrote on 2024-07-04, 15:35:

Also, why would a sine wave be a requirement ?

exactly, why would it?

I was wondering about that and couldn't really find a reason.

The only thing that I think might be a problem could be the delay from powerup to frequency output where I guess no frequency will be output thus no clock being generated thus computer no boot, but will it start booting when the clock has started ?

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 53 of 124, by rasz_pl

User metadata
Rank l33t
Rank
l33t

It will probably get programmed in under hundred microseconds (400Khz i2c), Cold powerup to valid clock output is 10ms, still probably shorter than reset pulse. If it was ever a problem (pre cmos, so nmos parts?) you could also wire reset to attiny to pulse after init.

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 54 of 124, by feipoa

User metadata
Rank l33t++
Rank
l33t++

With the summer behind us, I am slowly starting to come back to my old computers. I managed to test those inexpensive pre-assembled SI5351 units on a 386 motherboard at 84.4 MHz, using PLL_A.

The attachment SI5351_quick_test.JPG is no longer available

Next, I desoldered the components on the pre-assembled SI5351 PCB and transplanted them onto Wiretap's PCB. Wiretap's BOM specifies two 1uF 0603 caps and two 0.47uF 0603 caps. Unfortunately, the pre-assembled PCB contained only 0805 caps, and of values 23 nF, 25 nF, 7.7 uF, and 8.8 uF. I'm not sure how important these exact values are. Looking in my bin for SMD caps, I had to settle on 0805 1uF and 0603 0.1 uF. The assembled unit is shown here:

The attachment Wiretap_SI5351_assembled.JPG is no longer available

I tested Wiretap's PCB on a 386 motherboard. I am using my Arduino EtherTen (a fancy Arduino Uno) with the stock SI5351 libraries to output 84.4 MHz using PLL_A. The 386 was perfectly functional. Photos shown:

The attachment Wiretap_SI5351_in-motherboard_test_1.JPG is no longer available
The attachment Wiretap_SI5351_in-motherboard_test_2.JPG is no longer available

The next step is to eliminate the need for an Arduino, which is utilised to set the start frequency at every power cycle. Rasz was saying to strap on an ATtiny 13 to Wiretap's PCB. Due to the 1 KB flash limit of the ATtiny13, he has suggested that I look at some alternate code to fit this restraint, and in particular, the code from riyas.org https://github.com/riyas-org/tiny5351

Presumably, I would use SPI to programme the ATtiny13, with the Arduino UNO as Master and ATtiny13 as slave? [EDIT: however, the following chart shows that the ATtiny13 doesn't have SPI or I2c: https://en.wikipedia.org/wiki/ATtiny_microcon … omparison_chart ] Before learning how to do this, I decided it would be wise to test the riyas.org code on my Arduino EtherTen and attempt to boot the 386. Setup shown here:

The attachment Begin_test_of_riyas-org_code_for_ATtiny13.JPG is no longer available

I then ran the SI5351 example from the riyas.org zip file; copied to /Home/snap/arduino/current/Arduino/tiny5351-master/example/tinypll/tinypll.ino. I also copied i2cmaster.S, i2cmaster.h, slimmath.S, slimmath.h, tiny5351c, and tiny5351.h into this folder because the Arduino IDE wasn't finding tiny5351.h.

Unfortunately, when I hit compile, I was presented with some errors:

/home/feipoa/snap/arduino/current/Arduino/tiny5351-master/examples/tinypll/tinypll.ino: In function 'void loop()':
tinypll:56:2: error: 't' was not declared in this scope
t = ReadADC(3);
^
tinypll:57:9: error: 'prv_t' was not declared in this scope
if (prv_t != t) {
^~~~~
/home/feipoa/snap/arduino/current/Arduino/tiny5351-master/examples/tinypll/tinypll.ino:57:9: note: suggested alternative: 'div_t'
if (prv_t != t) {
^~~~~
div_t
tinypll:58:19: error: 'frequency' was not declared in this scope
si5351_freq(frequency+(t<<7), 0); //multiply adc value with 128 0-1023 becomes 0-(1023*128)
^~~~~~~~~
/home/feipoa/snap/arduino/current/Arduino/tiny5351-master/examples/tinypll/tinypll.ino:58:19: note: suggested alternative: 'freopen'
si5351_freq(frequency+(t<<7), 0); //multiply adc value with 128 0-1023 becomes 0-(1023*128)
^~~~~~~~~
freopen
exit status 1
't' was not declared in this scope

Not wanting to dive into the code at this point, I simply added:

int t;
int prv_t;
int frequency;

to the tinypll.ino code and the sketch uploaded to the EtherTen without error. However, CLKOUT on the wiretap PCB is not outputting a waveform. The Serial Monitor in the Arudino IDE also has no printed text (but maybe it isn't supposed to for this code). Any idea what went wrong?

If I cannot get the riyas code working, would it be possible to stick with the stock Arduino IDE code for the SI5351 and use the largest SOIC-8 microcontroller possible,thus meeting 6 Kbytes code requirement? It looks like the ATtiny85 can hold 8 Kbyte and it has 512 bytes of SRAM. However, according to my previous post, the stock Arduino SI5351 code uses 572 byes of SRAM and 6402 bytes of flash, so I'd still need to find a way to alter the code to reduce the SRAM requirement.

Plan your life wisely, you'll be dead before you know it.

Reply 55 of 124, by rasz_pl

User metadata
Rank l33t
Rank
l33t

cant help with arduino IDE, dont use it, cant run it without giving it access to internet 😐
if I had to guess it wants all those files from \tiny5351-master\ copied to C:\Users\ your user name goes here \Documents\Arduino\libraries\tiny5351\

tiny5351_avr_gcc.zip contains compiled test_binary_atmega328.hex, but your EtherTen has atmega328p and im not sure if those are binary compatible

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor

Reply 56 of 124, by Matchstick

User metadata
Rank Newbie
Rank
Newbie

Now, if you could program it with multiple frequencies, and add push button or rotary dial to it, so that you can cycle through the frequencies in real time, changing the clock as needed/wanted.

Reply 57 of 124, by feipoa

User metadata
Rank l33t++
Rank
l33t++

/home/snap/arduino is where the Arduino IDE 1.8.19 is installed on Ubuntu 18.04 LTS. The sub-folder structure is:

/home/snap/arduino/85/Arduino/libraries
/home/snap/arduino/85/Arduino/si5351_386_full_can
/home/snap/arduino/85/Arduino/tiny5351-master

within the libraries folder, there are two other folders:
/Adafruit_BusIO
/Adafruit_Si5351_Library

I also copied i2cmaster.S, i2cmaster.h, slimmath.S, slimmath.h, tiny5351c, and tiny5351.h to /home/snap/arduino/85/Arduino/libraries, however I still get compile errors if I do not manually insert "int t; int prv_t; and int frequency; into the code. One would think that the riyas example was ready to go, but maybe there's something else I'm doing wrong.

As for the AVR_GCC code, wouldn't I need to use the AVR 8-bit Toolchain from Microchip along with their programmer? I don't have one of those. At this point, I think it might be easier to trim the SRAM usage down on the Adafruit Si5351 base code to fit into an ATTiny85.

I was able to get the Adafruit Si5351 base code's usage of SRAM down to only 436 bytes by disabling the Serial monitor feature. On hand, I have an ATTINY85-20SU-ND, which is 8KB and, I think, 512 bytes SRAM. It is SOIC-8, so I'm going to need to figure out how to connect it to a breadboard for ISP programming using my Arudino.

Matchstick wrote on 2024-10-08, 19:09:

Now, if you could program it with multiple frequencies, and add push button or rotary dial to it, so that you can cycle through the frequencies in real time, changing the clock as needed/wanted.

That should be fairly straight-forward to implement if using a larger microcontroller like the Mega328, but with an ATtiny85, someone would have to trim the base code to make it fit the SRAM limit. Better yet would be to start from scratch. I don't have sufficient interest to pursue this path. I would be happy to get a redesign of Wiretap's PCB which incorporate space for an SOIC-8 ATtiny85. In which case, I'd probably have 10 or so units assembled with 1 MHz steps pre-configured.

Plan your life wisely, you'll be dead before you know it.

Reply 58 of 124, by feipoa

User metadata
Rank l33t++
Rank
l33t++

I remember I had about two dozen SMD to DIP adaptors that came with my TL866IIplus kit. As luck would have it, one of them fits the SOIC-8 format for the ATTINY85-20SU. Shown here:

The attachment ATtiny85_SOIC_on_DIP_adaptor.JPG is no longer available

The plan now is to follow this example to programme the ATtiny85 using my EtherTen: https://www.youtube.com/watch?v=Z_MhVSlMZI8

Pending the success of the programming, I'd attempt to stick the ATtiny85 onto Wiretap's PCB somewhere. Would Pin 7 correspond to SDA and Pin 6 as SCL?

Plan your life wisely, you'll be dead before you know it.

Reply 59 of 124, by rasz_pl

User metadata
Rank l33t
Rank
l33t
feipoa wrote on 2024-10-09, 08:32:

/home/snap/arduino/85/Arduino/libraries

copy contents of /home/snap/arduino/85/Arduino/tiny5351-master
to /home/snap/arduino/85/Arduino/libraries/tiny5351

feipoa wrote on 2024-10-09, 08:32:

still get compile errors if I do not manually insert "int t; int prv_t; and int frequency; into the code. One would think that the riyas example was ready to go, but maybe there's something else I'm doing wrong.

those variables are setup in setup() and work only in that scope, afaik declarations cant be in loop() as that code is called in a loop and would constantly reset them
move

uint32_t frequency=10000000UL;
uint16_t t;
uint16_t prv_t = 0;

above "void loop() {". I have to say example with such an error doesnt fill me with confidence 😀 hope rest of library works fine. Moving those three lines up compiles fine:
"Sketch uses 1618 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 13 bytes (0%) of dynamic memory, leaving 2035 bytes for local variables. Maximum is 2048 bytes."

feipoa wrote on 2024-10-09, 08:32:

As for the AVR_GCC code, wouldn't I need to use the AVR 8-bit Toolchain from Microchip along with their programmer?

I was surprised reading this sentence until I remembered Atmel was sold to Microchip 😮
https://www.instructables.com/Updated-Guide-o … ttiny13-or-13a/

feipoa wrote on 2024-10-09, 08:32:

I don't have one of those. At this point, I think it might be easier to trim the SRAM usage down on the Adafruit Si5351 base code to fit into an ATTiny85.

same deal https://www.instructables.com/How-to-Program- … an-Arduino-Uno/

no need to trim anything

feipoa wrote on 2024-10-09, 08:32:

That should be fairly straight-forward to implement if using a larger microcontroller like the Mega328, but with an ATtiny85, someone would have to trim the base code to make it fit the SRAM limit.

you dont need more sram for something as trivial as that, tiny5351 tinypll.ino example shows how to do it with couple lines of code, readadc, check if its different than previous reading, program frequency according to potentiometer readout (this is where you can later declare frequency range and step), delay(1000) - missing in the example, repeat.
1618 bytes flash, 13 bytes ram
Still, looking at contents of tiny5351.c that 13 bytes doesnt look right, should be more like ~30-40 bytes total. probably optimized out by the compiler.
Example most likely wont read adc on ATtiny85, InitADC() ReadADC() need changing https://www.phippselectronics.com/basic-adc-o … -using-arduino/

Edit:

start with something super basic on ATtiny85:

#include <avr/io.h>
#include <util/delay.h>
#include <avr/sleep.h>
#include <avr/interrupt.h>
#include "tiny5351.h"

void setup() {
si5351_freq(16000000, 0);
si5351_freq(25000000, 1);
si5351_freq(33000000, 2);
}
void loop() {
}

"Sketch uses 1454 bytes (4%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes."

https://github.com/raszpl/FIC-486-GAC-2-Cache-Module for AT&T Globalyst
https://github.com/raszpl/386RC-16 memory board
https://github.com/raszpl/440BX Reference Design adapted to Kicad
https://github.com/raszpl/Zenith_ZBIOS MFM-300 Monitor