EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

On hardware state machines: How to write a simple MAC controller using the RP2040 PIOs

Started by scaprileSRC 11 months ago23 replieslatest reply 2 months ago18 views

I wrote this article in my blog. Basically I use the PIOs in the RP2040 in the Raspberry Pi Pico to build a simple 10base-T Ethernet MAC controller with an RMII interface, and with a small driver I then use Mongoose to host a web server (to show it works...). Of course the Pico is connected to a PHY chip...

I'll be glad to read your comments (even on language command and literary style ;^) )


[ - ]
Reply by stephanebJuly 7, 2023

Hello Sergio,

Unfortunately, I cannot approve this message as it self-promotes a blog post outside EmbeddedRelated.  Would you be possibly interested in being a blogger on EmbeddedRelated?

Thanks!

Stephane

[ - ]
Reply by scaprileSRCJuly 7, 2023

Oh, I'm sorry, I missed that, I apologize.

That is a possibility, thanks, can you please give me some information to evaluate ?

Regards

[ - ]
Reply by stephanebJuly 7, 2023

No worries!  It's actually not stated clearly anywhere.

If you decide to try blogging on EmbeddedRelated.com, we'd promote your blog posts in our newsletter with more than 25k registrants.

We are also currently experimenting with a reward program for bloggers.  Basically, we will be paying $50 per 1000 unique views, up to a maximum of $1,000 per blog post that reaches 20k unique views within the first year of publication.  So for instance, if you’d post a blog that reaches 10k views within a year of being posted, you’d be paid $500.  

We hope to make the reward program more generous as the advertising landscape improves.

If you think you could be interested, please let me know and I’ll be happy to upgrade your account and give you access to the blogging interface.

Thanks  


[ - ]
Reply by scaprileSRCJuly 7, 2023

Thx, looks interesting ! As long as there is no obligation to post frequently and no charge for the upgraded account, I'm in.

Some questions, though.

What about intellectual property and all that related stuff ? Who owns the content posted to the blog ?

Can I post the same content on my site or you want some form of exclusivity ?

Thank you and best regards

[ - ]
Reply by stephanebJuly 7, 2023

> As long as there is no obligation to post frequently and no charge for the upgraded account, I'm in.

No frequency obligation and no charge.

> What about intellectual property and all that related stuff ? Who owns the content posted to the blog ?

You keep the copyright, but we have a right to use as we see fit.

> Can I post the same content on my site or you want some form of exclusivity ?

We strongly favor exclusive content to prevent any duplicate content penalty by search engines.  If you want to repost, we ask to wait at least 6 months after publication on EmbeddedRelated and to use the rel=canonical html tag.

Please let me know if you'd like to move forward and I will update your account.

Thanks!

[ - ]
Reply by scaprileSRCJuly 7, 2023

I'm OK with that, let's move forward, go ahead !

Nice meeting you, btw

[ - ]
Reply by stephanebJuly 7, 2023

Perfect!

I have updated your account to give you access to the blogging tools.

You'll find a tutorial at:

https://www.embeddedrelated.com/showarticle/828/bl...

Please pick a date or two that you feel comfortable with for the publication of your upcoming blog(s) and enter the topic on the following calendar:

https://docs.google.com/spreadsheets/d/1DGJNxRSjwg...

And please feel free to reach out to stephaneb@embeddedrelated.com if you have any questions.

Thanks!

Stephane


[ - ]
Reply by scaprileSRCJuly 7, 2023

> Unfortunately, I am not fully happy with the current highlighter (highlight.js) that is used, although it is the best solution I could come up with so far.  If you know of a better solution, please do not hesitate to get in touch.

I use prism.js

I add the HTML code to download it from my website, let me know if you'll host it so I can skip that part.

<link rel='stylesheet' id='prismCSS-css'  href="/path/to/prism.css?ver=5.3.15" media="all" />
<script src="/path/toprism.js" data-manual=""></script>

Regards

[ - ]
Reply by stephanebJuly 7, 2023

Does it work when you try to include it yourself in your blog?  I suspect it won't work this way.  I will try to have it integrated by the end of the week.  

[ - ]
Reply by scaprileSRCJuly 7, 2023

Actually I can't try.
I paste HTML + JS and I see the results on the editor. After I click "Save", the editor seems to get confused and I no longer see the edit bar.
Removing the JS seems to be fine.

Other issue: I can't use double quotes on the title

BTW, I also use this JS to get code off Github and highlight it on-the-fly:

<script async="">
window.addEventListener('load', async function(ev) {
  var ghload = async function(url) {
    let raw = url.replace('//github.com', '//raw.githubusercontent.com')
                 .replace('/blob/', '/');
    let resp = await fetch(raw);
    let text = await resp.text();
    let m = url.match(/.*#L(\d+)(-L(\d+))?/);
    if (m) {
      let start = m[1], end = m[3] || m[1], lines = text.split('\n');
      text = lines.slice(start - 1, end).join('\n');
    }
    return text;
  };
  var elems = document.body.querySelectorAll('.ghcode');
  for (let i = 0; i < elems.length; i++) {
    var url = elems[i].getAttribute('src');
    var text = await ghload(url);
    text = Prism.highlight(text, Prism.languages['clike']);
    elems[i].innerHTML = '<pre><code class=language-ccode>' + text + '</code>
'; } });


As you can see, your code also got confused here because my code includes and in it... The last lines are crippled

The trick is to assign a class to an element (a div), then src= the Github permalink.

The script then gets the code from the raw area (plain code with no Gitgub interface) highlights it, and delivers proper HTML within a pre-formated block.

Actually I use -pre- -code- as that is what marked generates, I write markdown on any text editor and then marked converts it to HTML.

Do you think you could also get a script like this one installed ? I guess many will find it interesting and make good use of it, instead of pasting and editing code just click in Github and paste the permalink...



[ - ]
Reply by stephanebJuly 7, 2023

Hello!

I am currently travelling and I will be back at the office next week.  I hope to implement many of your suggestions when I return.  I'll keep you updated.  Thanks!


Stephane

[ - ]
Reply by stephanebJuly 7, 2023

I have also installed your script for your blogs.  Can you test it and see if it works?

[ - ]
Reply by scaprileSRCJuly 7, 2023

Hi,
the script is served, I see it in the page source code. However, the DIVs are removed from the HTML source code so nothing remains to trigger that.

I switched to using SPAN instead, and it works; THANKS !

Let me know if there is any other possible trick

[ - ]
Reply by stephanebJuly 7, 2023

Prism.js is now included for you.  Let me know if it seems to work.

[ - ]
Reply by scaprileSRCJuly 7, 2023

As I've always used, and as I've seen in their page, Prism expects a CODE object with some CLASS.

I generate nested PRE and CODE objects (a CODE inside a PRE), however, your editor replaces the less than and greater than symbols by their HTML encoding sequences, so there is no actual CODE...

If I use only PRE and assign a class, it does not work.
If I use only CODE and assign a class, it works but I lose formatting.
PRE CODE /CODE /PRE gets turned into PRE ampersand lt; ... you know...

[ - ]
Reply by stephanebJuly 7, 2023

Hmm, I suspect it is probably the javascript code for the editor that converts every special chars inside a PRE into the html symbol.  I'll have to investigate...

[ - ]
Reply by scaprileSRCJuly 7, 2023

BTW, clicking on "Your blog" shows me everybody's blogs but mine...

If I save something, I can only access my blog by clicking on "Preview" while at the editor, once I exit the editor I can no longer see the saved articles.

I actually have at least 2 test articles saved

[ - ]
Reply by stephanebJuly 7, 2023

Should be fixed by now.

[ - ]
Reply by scaprileSRCJuly 7, 2023

YES!, thx a lot

[ - ]
Reply by scaprileSRCJanuary 15, 2024

Hi Stephane, on Hanuary 5th I got a PayPal payment for scaprile@gmail.com from you. My PayPal email address is scaprile@ldir.com.ar so I logged in, added that email, and claimed that payment. Then that payment was cancelled.

I can fwd those emails to you if necessary.

Can you fix this, please ?

Regards


PS: BTW, being paid is cool, some projects pay for their hardware expenses themselves, while one enjoys doing them. As soon as I can get hold of some free time I will resume writing, this past one has been a heck of a complicated year.

[ - ]
Reply by stephanebJanuary 20, 2024

Hello Sergio,

Sorry for the delay in responding.

If he hasn't done so yet, @beningjw will be having a look soon.

Please feel free to ping us again this coming week if by then you haven't received a payment yet.

Thanks.

[ - ]
Reply by scaprileSRCJanuary 29, 2024

Hi Stephane, no transcations in nor requests from PayPal these weeks.

[ - ]
Reply by stephanebJanuary 29, 2024

Jacob just initiated the payment.  Please let me know if it doesn't reach you today.  Thanks and sorry for the delays.

The 2024 Embedded Online Conference