Quark-85 Demo Kube - 184 x 240 VGA with 8 Colors and Sound on an Tiny85!!

Go To Last Post
438 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For the curious, here is the PIC8 Assembly Source Code for my Quark10 VGA Engine.

This demo includes the routine that bounces the 4 color blocks around.

 

http://lucidscience.com/temp/Quark10.asm

 

For those that only know AVR Assembly, you can see that it takes a lot more code to make things happen in PIC8!

The W register is certainly a bottleneck, and add that to the quarter execution speed of AVR8, and it hurts!!

But it's not all bad. The ability to write a value directly to a PORT is great. Would make a fast 8 bit counter.

 

Ok, I am moving on now. Nothing more to do with a PIC10F.

I did what I intended, and although the results were lackluster, it did work!

The first example of a PIC10F doing VGA perhaps? Nonetheless it was fun!

 

My next challenge is going to be a real step up for Video Generation... PIC32.

I have a PIC32MX-270F256B sitting in a breadboard awaiting my instructions.

Looking at the MIPs instruction set, it looks no more difficult than any.

 

If I can get cycle counting under control, I would expect to reach 800x600 or better this time.

The PIC32 has plenty of speed at 50MHz, but of course, I am going to try jamming it up to 80MHz.

 

Just need a free weekend to get something going.

Not many freaks doing PIC32 assembly, so this will be a lot of fun.

It's always more fun to me when there are no examples to follow.

 

If things work out, the PIC32 will become my processor of choice.

Up until now, XMega / FPGA did my heavy lifting.

 

Bring the 32 Bit!

 

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

If things work out, the PIC32 will become my processor of choice.

Up until now, XMega / FPGA did my heavy lifting.

 

Do you have VGA numbers for XMega  ?

PIC32 in ASM will be interesting - why do you skip over the more deterministic dsPIC ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

Ok, had a few hours to mess around in the lab last night and have learned enough PIC assembly to code fluently.

As a veteran AVR Old Dog, the learning of new tricks has not been all too bad. Here are my opinions so far...

 

 

 

- MPlab and AVRStudio are both top notch IDEs for assembly. As for C, I will probably never bother to compare.

 

- Datasheets are both equal in delivery of information and depth. The odd error on both sides of the fence.

 

- The amount of community on the AVR side blows the PIC side out of the water by a huge margin!

Over on the PIC forum, it's a different World. A PIC hobbyist better know how to read datasheets and self learn!

 

- Pic external oscillators make for very noisy IO pin switching. At least, this is what I found on the 10F322.

With internal OSC, the signal is clean, like AVR. With an external clock, there is an odd harmonic.

 

- The PIC I am using seems to be an overclocking wonder, but the IO noise may be the limit. Time will tell.

 

- The 4 cycles/instruction thing hurts. Without a doubt, AVR8 vs PIC8 is not even a contest. NOP ;4... ACK!

 

 

Squeezing VGA out of the PIC10F is going to be a challenge!

So far I have SYNC almost working. Some TIMER2 compare match issues still to resolve.

If I can get anything decent at all, it will be a greater accomplishment than doing it on the ATiny85!

 

Brad

 

Irrespective of what's going on, this is still an Atmel AVR forum and the discussions should remain focused as such.  There's no harm in bringing Microchip or their products into the discussions but please refrain from promoting non-AVR devices and tools on this site.  This includes describing your PIC-related projects with the intent of attempting to shine a negative light on AVR.  Doing so devalues and distracts the community as a important and valuable resource for AVR and could be viewed as a violation of this site's terms of use especially where spam is concerned.  If you wish to discuss PIC and a PIC-related design, please feel free to do so in the appropriate Microchip forum.

 

Moderators, please use this response as a guideline for such matters.

Please Read: Code of Conduct

Documentation: Atmel Community User Guide (work-in-progress)

Site Updates: Changelog

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, no more side by side comparison of this project. I will keep it to the AVR variants only.

 

On a side note...

There is no light that could shine negative on AVR man!

 

Cheers!

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Michael@Atmel wrote:

Irrespective of what's going on, this is still an Atmel AVR forum and the discussions should remain focused as such.  There's no harm in bringing Microchip or their products into the discussions but please refrain from promoting non-AVR devices and tools on this site.  This includes describing your PIC-related projects with the intent of attempting to shine a negative light on AVR.  Doing so devalues and distracts the community as a important and valuable resource for AVR and could be viewed as a violation of this site's terms of use especially where spam is concerned.  If you wish to discuss PIC and a PIC-related design, please feel free to do so in the appropriate Microchip forum.

 

Moderators, please use this response as a guideline for such matters.

 

Oh dear, I wonder if you actually read the whole thread ?

 

So you have now created, single handedly, some vague line, where " There's no harm in bringing Microchip or their products into the discussions", but as soon as any relative specs make AVR look "less fabulous", that's magically a big No-No ?

 

You may want to more carefully define just where that line is, so Moderators can understand what you mean exactly.

 

What exactly is a 'negative light'  - it seems Anti-photons do not exist ?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
Oh dear, I wonder if you actually read the whole thread ?   So you have now created, single handedly, some vague line, where " There's no harm in bringing Microchip or their products into the discussions", but as soon as any relative specs make AVR look "less fabulous", that's magically a big No-No ?   You may want to more carefully define just where that line is, so Moderators can understand what you mean exactly.   What exactly is a 'negative light'  - it seems Anti-photons do not exist ?

 

I did not read the entire thread.  While the thread may have turned out to be harmless in the end (after 350+ posts), I felt it started off on the wrong foot and got a little sketchy along the way.

 

Why start a thread to compare competing products in the first place?  This forum is meant to serve as a technical resource for AVR and those who have questions about their AVR designs or are thinking of using AVR in a design.  You wouldn't expect to come here looking for answers to your AVR-related questions only to find members providing details about PIC, would you?

 

This site will never censor those who wish to post something that's not entirely flattering for AVR but if a thread is started to focus on a non-AVR device then it doesn't belong here.  There are better forums for that material.

 

I wasn't attempting to draw the line for the moderators to follow.  As I said, I was providing guidelines which are simply meant to be used for making a judgement call.  That includes users who wish to consider posting such threads in the first place.

 

And...how do you know "anti-photons" don't exist?

Please Read: Code of Conduct

Documentation: Atmel Community User Guide (work-in-progress)

Site Updates: Changelog

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Michael@Atmel wrote:

 

I did not read the entire thread.  While the thread may have turned out to be harmless in the end (after 350+ posts), I felt it started off on the wrong foot and got a little sketchy along the way.

 

 

Why start a thread to compare competing products in the first place?  This forum is meant to serve as a technical resource for AVR and those who have questions about their AVR designs or are thinking of using AVR in a design.  You wouldn't expect to come here looking for answers to your AVR-related questions only to find members providing details about PIC, would you?

 

 

 

ATTiny85... an Atmel chip, no?

Seems like the right foot to me!

 

Anyhow, no big deal.

I will take the PIC vs AVR part out, even though it clearly shows that AVR eats PIC for breakfast.

 

.... it's not my house, so I don't make the rules here!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Michael@Atmel wrote:

I did not read the entire thread.  While the thread may have turned out to be harmless in the end (after 350+ posts), I felt it started off on the wrong foot and got a little sketchy along the way.

 

Why start a thread to compare competing products in the first place?  

 

?? The thread started out purely on ATtiny85, it did not "start a thread to compare competing products in the first place"

 

Only after the OP had managed some very impressive things with ATtiny85, did the musings turn to what else is out there.

 

Think of VGA pixel pumping as a niche benchmark.

 

Like the broader Sieve et al, such benchmarks are more useful to readers if they do include alternatives.

 

So far, the numbers show a PIC10 (not surprisingly) comes in a distant second to ATtiny85.

 

I'm not sure the mentioned next target of PIC32 is considered a 'competing product' by anyone using a ATtiny85 either ?

 

Michael@Atmel wrote:

And...how do you know "anti-photons" don't exist?

:) I don't  - I said  :  it seems Anti-photons do not exist.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Clearly I should have read the entire thread and closely although, honestly, who has time to read 350+ posts from the beginning?  I started at the top and stopped where I began to feel I needed to say something.  I apologize if my response, in the end, was unfounded.

Please Read: Code of Conduct

Documentation: Atmel Community User Guide (work-in-progress)

Site Updates: Changelog

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Michael@Atmel wrote:

Clearly I should have read the entire thread and closely although, honestly, who has time to read 350+ posts from the beginning?  I started at the top and stopped where I began to feel I needed to say something.  I apologize if my response, in the end, was unfounded.

 

It's all good.

I felt guilty for posting the PIC related stuff here anyhow!

It did shine that light you mentioned though, but not in favor of the other guy's 8 bit offering!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I apologize if my response, in the end, was unfounded.

I don't think an apology is needed, and this isn't my thread, but just to clarify:

  1. This thread was started two-and-a-half years ago, and has always been about AVR.  First, the ATtiny85, then two month ago the ATmega328.
  2. The first mention of a PIC was less than a month ago, and in the context of a comparison with AVR wherein the PIC is the clear loser.
  3. No mention of PIC or Microchip was made until after the Microchip announcement was made.

 

I will take the PIC vs AVR part out

Not my thread and not my house, but I think the comparison sidebar has been interesting, instructive, and not at all negative.  I think it would be a shame to purge this part of the thread.

 

 

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:
I still see the slower IO when using the internal clock though.

If ground bounce was the issue, then why is it worse on the internal oscillator?

Phase distortion is common with oscillators and PLLs possibly due to poor PSRR.

  • Implement recommended power supply filtering (datasheet, schematic check list, application notes).
  • Replace the voltage regulator with a battery or cell with "enough" and "proper" bypass capacitance.
  • Reduce the area of the immediate current loop for the MCU power (power and return, bypass caps close to the MCU, minimal wire or trace lengths).

SMPS is not compatible with some analog (oscillators, very high impedance circuits, RF LNA, RF VCO, CMOS image sensors, ...)

Some linear voltage regulators also create possibly significant noise; some recent LDO VR are low noise wrt RF.

Linear VR -

  • Shunt VR possibly have reduced noise versus a series pass VR.
  • CMOS VR usually have some noise; a VR by a bipolar pass transistor and a bypassed low noise reference are better.
  • Reference - via a current source may have reduced noise versus via a voltage source.

Most regulators (voltage, current) are conditionally stable; there is feedback from the MCU into the VR.

Thank you for your XMEGA with a SMPS discovery.

P.S.

Power supply criteria :

  • Efficiency
  • Noise
  • Stability

P.P.S.

why is it worse on the internal oscillator?

The MCU's inverter in its oscillator is too weak (not enough drive current); that's good because reduces EMI (increased rise/fall-time) and reduces supply current.

Depends on how the current from an external oscillator is entering (at least two ways).

Might try an external inverter "parallel" to the internal inverter.

WAG

(Oh, you're trying to reduce pin usage wink

Could try a part with the 32MHz internal oscillator.

 

Edit : 32 MHz.

"Dare to be naïve." - Buckminster Fuller

Last Edited: Wed. Mar 2, 2016 - 02:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:
in the context of a comparison with AVR wherein the PIC is the clear loser.

@Michael. To be honest I don't know what your "issue" is? This thread is now living proof of something we've always known (or at least had an inkling): AVR whoops the PIC's ass! How can that be bad? Personally I have found it most illuminating. cheeky

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This has been a fascinating thread - evidenced by the large number of posts, of which the vast majority have been complementary, contained useful information, good tips, and have generally been at an adult level.

 

Yes, it is an Atmel forum, and this thread did start off on solely on an Atmel theme, and it remained that way for a great many posts (well over 200). In fact AtomicZombie asked more than once as the 'flavour' shifted if people thought it was OK to talk PIC. I think (personally) that shifting flavour in this circumstance is just fine. I do a lot more reading than posting on this forum, and I certainly don't come here to read "fanboy comments on how good AVR is". It would be a real crime if other views (constructive views only thanks) are snuffed out simply because they don't crow AVR from every orifice!! I come here to read adult conversations and get a fair view, and am very interested when people DO talk alternatives. This is a great forum, with many knowledgeable members who have significant experience in a great many things, Atmel chips being just one of those things. Would it be fair, for example, to ban talk of linear regulators, transistors or power triacs simply because Atmel might not make the particular part discussed!

 

Back to Quark, regardless of which form it takes, and I've noticed many people espousing Brad to work with different chips (I really don't care which manufacturer) but I think many of them missed the point. The original concept was to see how much could be done with how little, and I think that VGA from an 8 pin AVR or a 6 pin PIC, with nothing but passives, is simply awesome. It's dead easy to do it with a more powerful processor : a switched on primary school kid could probably do it, and that defeats the whole damn purpose.

 

I am truly happy to see the complete source code for the PIC, but (as far as I could tell) the complete source for the AVR was never posted. That is the sort of comparison people like me (an electronics engineer for over 20 years) truly want to see.

 

Brad did himself note the AVR '85 "is a mainframe" compared to the PIC10F, and there was (I consider) some really exciting discussions about trying to get VGA from an ATtiny10. I am a little saddened to see him simply stepping over that to a gruntier chip. I really wanted to see him try VGA with an ATtiny10 : now that would be a truly fair comparison!

 

MM.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MustardMan wrote:

there was (I consider) some really exciting discussions about trying to get VGA from an ATtiny10. I am a little saddened to see him simply stepping over that to a gruntier chip. I really wanted to see him try VGA with an ATtiny10 : now that would be a truly fair comparison!

Have no fear:

 

AtomicZombie wrote:

On a positive note, it looks like my ATiny10 samples are coming!

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

MustardMan wrote:

This has been a fascinating thread - evidenced by the large number of posts, of which the vast majority have been complementary, contained useful information, good tips, and have generally been at an adult level.

 

Yes, it is an Atmel forum, and this thread did start off on solely on an Atmel theme, and it remained that way for a great many posts (well over 200). In fact AtomicZombie asked more than once as the 'flavour' shifted if people thought it was OK to talk PIC. I think (personally) that shifting flavour in this circumstance is just fine. I do a lot more reading than posting on this forum, and I certainly don't come here to read "fanboy comments on how good AVR is". It would be a real crime if other views (constructive views only thanks) are snuffed out simply because they don't crow AVR from every orifice!! I come here to read adult conversations and get a fair view, and am very interested when people DO talk alternatives. This is a great forum, with many knowledgeable members who have significant experience in a great many things, Atmel chips being just one of those things. Would it be fair, for example, to ban talk of linear regulators, transistors or power triacs simply because Atmel might not make the particular part discussed!

 

Back to Quark, regardless of which form it takes, and I've noticed many people espousing Brad to work with different chips (I really don't care which manufacturer) but I think many of them missed the point. The original concept was to see how much could be done with how little, and I think that VGA from an 8 pin AVR or a 6 pin PIC, with nothing but passives, is simply awesome. It's dead easy to do it with a more powerful processor : a switched on primary school kid could probably do it, and that defeats the whole damn purpose.

 

I am truly happy to see the complete source code for the PIC, but (as far as I could tell) the complete source for the AVR was never posted. That is the sort of comparison people like me (an electronics engineer for over 20 years) truly want to see.

 

Brad did himself note the AVR '85 "is a mainframe" compared to the PIC10F, and there was (I consider) some really exciting discussions about trying to get VGA from an ATtiny10. I am a little saddened to see him simply stepping over that to a gruntier chip. I really wanted to see him try VGA with an ATtiny10 : now that would be a truly fair comparison!

 

MM.

 

Greets!

 

I am definitely doing an Tiny10 version if I get my samples!

That will be a nice break while I am deep into learning MIPs assembly.

 

Ok, back to the dark side for a bit!

I am dealing with setting the clock and interrupts on a PIC32 in pure assembly.

MIPs is a different animal indeed.

 

Ps...

Yes, I do in fact dislike indented or overly commented code!!!!

 

Cheers Freaks!

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Mon. Jul 25, 2016 - 09:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
@Michael. To be honest I don't know what your "issue" is? This thread is now living proof of something we've always known (or at least had an inkling): AVR whoops the PIC's ass! How can that be bad? Personally I have found it most illuminating.

 

I opened my mouth before my brain was ready.  Just another dumb thing I've done.

Please Read: Code of Conduct

Documentation: Atmel Community User Guide (work-in-progress)

Site Updates: Changelog

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MustardMan wrote:

 

Back to Quark, regardless of which form it takes, and I've noticed many people espousing Brad to work with different chips (I really don't care which manufacturer) but I think many of them missed the point. The original concept was to see how much could be done with how little, and I think that VGA from an 8 pin AVR or a 6 pin PIC, with nothing but passives, is simply awesome. It's dead easy to do it with a more powerful processor : a switched on primary school kid could probably do it, and that defeats the whole damn purpose.

Not entirely.

A key element of minimal-VGA is the crafted algorithms, and those can also be used on more powerful parts, to give better VGA specs than 'a switched on primary school kid'.

 

Sometimes RAM is the ceiling you bump into, sometimes it is Cycles.

 

I would be interested in the VGA performance numbers that can result from this code on a XMEGA-E5 series, and maybe SAMD09

(should follow from MIP32 work)

 

Any part that is similar, or less in price than a VGA connector to me is a valid candidate. 

Excessive lobotomy has less appeal from a practical angle, and I've never really warmed to SOT23 UC, (or even SO8) as you always seem to come up short on pins. 

MSOP10 to me is a much smarter offering for same PCB area as SOT23, but not many MCU vendors offer that yet.

 

There is also a new SO16N sized package with 20 pins, (0.8mm) appeared in Asia  which appeals as being more wave-solderable than 0,65mm SSOP parts.

Any vendor offering SO14-SO16 should look at  that 0.8mm 20 pin, as they usually also offer QFN20 (ie die is 20 pin designed).

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

Ok, back to the dark side for a bit!

I am dealing with setting the clock and interrupts on a PIC32 in pure assembly.

MIPs is a different animal indeed.

 

You could also look at SAMD09, at the same time - should be broadly similar ?

Have you got far enough to bump into Cache & code alignment issues yet ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

 Most of the code is the huge unrolled pixel spewing loop!

184 times this....

ld r16,Y ;2
out DDRB,r16 ;1
st Y+,r2 ;2

Assemblers usually have a REPT or similar macro-repeat comment, curious why do you not use that ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been dealing with micros from quite soon after I started my first job, and yep, I'm one of the lucky few who gets paid for at work what I also do at home for a hobby! There are so many more micro offerings out there now, from processing power to physical size. Back in the early 80's, if you wanted a micro it was 40 pin DIP... or... 40 pin DIP.

 

Over time my work has required smaller and less 'capable' chips, and one thing that I've learnt is that the requirements come first, and the part second. Saying one chip (or manufacturer) is better than another usually has very little to do with it. My latest, from most important... physical size = less than 3mm x 3mm, processing power = minimal (a 500kHz clock is fast), input = 1, output = 2, self-programmable flash = yes, analog in = 1, hand solderable = yes, ROM > 256bytes, RAM > 10 bytes, timer/counter = no.

Only one chip fit the bill, and it was that "other" chip. I looked at ATtiny, cypress (an 8051 derivative) and two other manufacturers. Those four were the only ones that came even vaguely close (that I could find), and the "other" chip was the only one that met all my requirements. With my task assembler was just fine and fitted in the memory easily. A DFN package can be hand soldered, but damn it is hard doing so, so they were included in my list. The "other" part won out in the end (a DFN2030 was chosen, less PCB area than a SOT23-6) which was a downer because the architecture is woeful and the instruction set pitiful. Still, that's what the requirements said - I just had to make it work.

 

On another note, would 'Quark' really be an algorithm that would be used on a higher spec part? It's certainly a very nifty piece of code, but it is written/optimised for having virtually no hardware to help out... no DMA, a single timer & interrupt, limited pins, no DAC... a 'better' chip would probably have (at least) SPI ports, multiple timers, possibly multi-level interrupts, PWM, and all sorts of other juicy stuff that could be levered in clever ways to achieve VGA. I'm not poo-pooing the idea at all though : some of the Quark mindset could certainly be carried forward.

 

 

I've used assemblers for many years and never come across REPT, but then again, I've never needed such a function.

 

@Brad : Thanks for the AVR code. You did post some juicy snippets many posts back (over 100?), but it is really good to see the whole code. Cheers!

 

MM

 

PS: Looking forward to the ATtiny10..!

 

Last Edited: Wed. Mar 2, 2016 - 08:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Back in the early 80's, if you wanted a micro it was 40 pin DIP... or... 40 pin DIP.

Unless you had space for a 64pin DIP 68000.

 

David 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Unless you had space! LOL, yes! That was one mighty big chip, even compared to the microprocessors from the '90s (aka: 486, pentium and cohorts). Didn't they squash the pin spacing in an attempt to make them not-quite-so-huge, or was that something else that was released at about the same time?

 

I've been posting too much... I'm dragging this thread into history and away from the interesting stuff. I'm going to go back to just reading.

 

MM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MustardMan wrote:
I've used assemblers for many years and never come across REPT, but then again, I've never needed such a function.

 

Google Macro Assembler REPT, and you get > 25,000 hits.

 

MustardMan wrote:
On another note, would 'Quark' really be an algorithm that would be used on a higher spec part? It's certainly a very nifty piece of code, but it is written/optimised for having virtually no hardware to help out... no DMA, a single timer & interrupt, limited pins, no DAC... a 'better' chip would probably have (at least) SPI ports, multiple timers, possibly multi-level interrupts, PWM, and all sorts of other juicy stuff that could be levered in clever ways to achieve VGA. I'm not poo-pooing the idea at all though : some of the Quark mindset could certainly be carried forward.

It is more portable than you might think.

 

SPI can hit the CLK speeds, but it is limited to Monochrome only.

DACs on low end MCUs are nowhere near fast enough for VGA

Timer and Interrupts only help a little, as you still cannot interrupt the display area.

 

Certainly Serial port HW can help system design, on Terminal type uses, as you can service incoming data bytes only when time is available.

 

The only hardware listed above that can really help Colour VGA display, is DMA, and that's often got caveats too.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I never  use the on-board peripherals, it's no fun!

A timer and pure cure, that's my style.

Tried the DMA on XMega once, but my code blew it away for speed.

Even on the MIPs project I am doing in the PIC32 now, I am NOT using anything but bit banging in a timer interrupt.

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi there!

 

It's been a while since I visited this thread, all kind of other stuff keeps me busy.

 

I've been having a feeling that my OctaPentaVeega is quite ready for a product - featurewise and very stable (even heard some people figured out real use for it) and I started to look for smaller challenge :)

 

Nice to see that Brad also got back into small chips, the PIC and Attiny10.

 

I found myself even smaller chip than Attiny10 - It's Attiny4. Unfortunately I couldn't find any supplier who stocks Attiny4, but they do seem to have Attiny5 - which is the same chip but only ADC added. 

 

Attiny5: SOT23-6, 32 bytes of RAM and 512 bytes of flash - that's 256 instructions :)

 

Got my basic VGA engine running in <100 instructions. I'm not overclocking the tiny, I'm running it at 12MHz external oscillator. 3 pins go to VCC, GND and oscillator, so I'm running 8 color VGA out from the rest.

 

Progress so far:

 

Attiny5 wavy VGA 8-colors

Attiny5 jumpy VGA 8-colors

 

This is my setup:

 

Attiny5 on breadboard (left red breakout) and oscillator (right red breakout) :)

 

 

Let's see where this goes, I still have >200 bytes left on flash!

 

Cheers,

 

//Jartza
Jari Tulilahti

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An excellent display of optimizationry!

Pretty soon we will have to make video on a single transistor!

 

Cheers!

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi?

No news is good news? Is it just me who's been very busy with real life, or are we done yet? :)

 

(Just checking)

 

 

//Jartza
Jari Tulilahti

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think he's on another project, but I haven't seen him for a while.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Happens every year when the weather gets warm. He switches to outside projects and bikes. Hasn't posted at the uchip forum for a while either.

 

Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

RickB wrote:

Happens every year when the weather gets warm. He switches to outside projects and bikes. Hasn't posted at the uchip forum for a while either.

Rick

 

Hey Freaks!

Yeah... now that I am practicing sustainable living, the ole' homestead has claimed all of my free time until the next deep freeze sets in.

 

I do have a massive ongoing electronics project on my bench, but it is far removed from anything modern such as uC, FPGA, and related technology.

 

As for the PIC projects, I must admit that I lost interest in a hurry.

I gave it a true, unbiased run, but the fact is that an XMega can still womp the largest PIC32 for IO speed and program stability.

If you want raw IO speed and cycle accurate results, it isn't even a fair game. XMega easily reaches 64MHz and kills the PIC32.

It was a fun challenge to learn MIPs assembly and make the PIC32 spew VGA, but I would not take it any further.

If I decide to crank out any more single chip video things, my next one will by FPGA banging HDMI.

 

For the next year or two, I intend to dedicate my nerd time to my 7400 retro project until it is completed.

I have pretty much lost interest in the "modern" electronics hobby now that everything is spoon fed.

Wiring up over 500 logic ICs and making it all from scratch has been far more rewarding for me lately.

 

When I get a chance to organize and post  the thousands of photos I took on the logic  project, I will post a link.

 

Ok, my chickens are calling and the deer are back in the garden, so I have to roll!

 

Cheers Freaks!

This is still the best uC forum going by far!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

 

As for the PIC projects, I must admit that I lost interest in a hurry.

I gave it a true, unbiased run, but the fact is that an XMega can still womp the largest PIC32 for IO speed and program stability.

If you want raw IO speed and cycle accurate results, it isn't even a fair game. XMega easily reaches 64MHz and kills the PIC32.

It was a fun challenge to learn MIPs assembly and make the PIC32 spew VGA, but I would not take it any further.

 

Can you expand a little more, on which PIC32 you used, and what PIC32 did well, and where it ran into problems ?

What VGA specs were you able to achieve on PIC32, both within Clock Spec, and Over-Clocked ?

Last Edited: Mon. May 16, 2016 - 09:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

Can you expand a little more, on which PIC32 you used, and what PIC32 did well, and where it ran into problems ?

What VGA specs were you able to achieve on PIC32, both within Clock Spec, and Over-Clocked ?

 

I used the most powerful PIC32 I could find in a DIP package... 32MX270.

The issue was predictable raw IO speed + internal SRAM speed (getting bytes from memory to port).

Besides having a broken IO layout (no full 8 bit port), read and send speed was not all that great.

 

I think my best was 10 MHz output at 50Mhz (10MHz overclocked). This was optimized ASM.

For comparison, XMega gave me 23MHz bandwidth clocked at 68MHz

By bandwidth, I mean how many bytes can I sent to a port at a given clock speed.

 

The PIC32 also has a broken byte port, so it can only do 6 bits!

 

Now to be fair, MIPs is not ASM friendly, and the PIC32 does have its merits.

If I wanted to program in C, and did not want to count cycles, the PIC32MX is a nice chip.

Of course, the question would be... why not just use an ARM?

 

Pretty soon transistors are going to run Linux. Where is the fun in it these days?

.... just ordered another $200 worth of 74HC logic ICs from Digikey, that's where!

 

Brad

 

 

 

 

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

.... just ordered another $200 worth of 74HC logic ICs from Digikey, that's where!

Fun costs money! ;-)

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

 

.... just ordered another $200 worth of 74HC logic ICs from Digikey, that's where!

 

That 74HC stuff is for wimps.

Why not use some real Logic ICs ??

http://www.analog.com/en/product...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

data transmission rates up to 43 Gbps and clock frequencies as high as 43 GHz

Holy #@#$^!

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wouldn't work for me, my scope only goes to 60Mhz and I can't seem to find a 43Ghz crystal in my junk box.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, but for my projects, I'm not ready to spend $90 for a flip-flop!

David (aka frog_jr)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Quark-85 is still alive and just broke another milestone!

 

Now that my Quark-Loader hardware allows full access to all IO pins, I recoded the sound routine for 2 voices.

Quark-85 now has : 184x240 VGA output with 8 colors, Dual Voice Sound, and a Joystick!

Yeah... somehow the ADC works fine even when outputting sound on the same pin!!

 

Not sure how this works, but it does.

PORTB.5 is set as an output only, and is playing dual pulse sound by mixing 2 frequencies together.

Just for kicks, I dropped my ADC code back in, and it is able to read the potentiometer on the same pin.

I always thought the ADC pin needed to be an input, but that assumption is now dead.

 

This is hard to believe, but it is worked perfectly!

I will post videos and a schematic when I have the chance.

 

This is definitely my favorite uC project of all time.

Each time I do a little more, it blows me away what can be achieved with the little 512 byte chip.

 

I sure hope the Empire does not  vaporize the ATiny series!

 

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looking forward to seeing videos and the schematic, Brad!

My digital portfolio: www.jamisonjerving.com

My game company: www.polygonbyte.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

...

Yeah... somehow the ADC works fine even when outputting sound on the same pin!!

 

Not sure how this works, but it does.

PORTB.5 is set as an output only, and is playing dual pulse sound by mixing 2 frequencies together.

Just for kicks, I dropped my ADC code back in, and it is able to read the potentiometer on the same pin.

I always thought the ADC pin needed to be an input, but that assumption is now dead.

ADC measures what is on the pin, and it can work on most MCUs in output modes.

Of course, the dynamic range is very different, as you measure the drops across the P or N drivers, but P is somewhat softer, and you can probably pull that down 500mV to 1V and still have most other stuff work.

We have used this to confirm load-connected on OUTPUT mode pins. (ie check for some small driver offset voltage ) 

 

 

AtomicZombie wrote:

I sure hope the Empire does not  vaporize the ATiny series!

 

There was a hint of a ATtiny817, that some claimed has a XMega core.

However that info which was on here, and at Mouser, seems to have been pulled, and is now Google ghosts - strange the longer this goes on.

Usually early leaks are common, but information removal is less common.

 

IAR still says this 

New devices
Support has been added for the following devices: 
ATtiny817.

 

Octopart still shows ATTINY817 XPLAINED PRO EVALUATION KIT

 

An XMega tiny would be interesting.

Last Edited: Fri. Jul 29, 2016 - 01:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm completely amazed, as always.

 

You said a while ago you were waiting for some Tiny 10 samples? Want me to send you a few? I'm fascinated by the idea of a whole stupid computer in a 2x3mm package. It's smaller than the ISP connector! I was going to lay out a Tiny10 board that I could ISP with pogo pins right off the chip's pads, but life got in the way. I made a useless machine a while ago with a Tiny 10. One pin for the switch, one for the servo and one for the SOT-23 fet that turns the servo off when it's not doing anything.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the comments!

 

Interesting about the ADC, but that makes sense.

I found that at higher frequencies, the sound pulses did affect the reading.

 

I am not planning to actually use the ADC in this project, as it is a "Demo Platform" not a Game System.

It was interesting to see it work though.

 

I have now added 4 voices of sound, and am trying to make one of them white noise.

The little ATiny is really pushing the limits now!

 

Tiny XMega core?!.... yeah I would stand in line for that!

 

Torby... in the late fall when I have indoor time again, I will order a few Tiny10s for experimentation.

Should be able to get this Video Engine up and running on it with no issues, although with only 4 colors due to less SRAM.

 

Now if I can only solve this issue, development will have 4 less clicks!...

https://www.avrfreaks.net/comment...

 

 

Will post again when I get the chance.

Cheers,

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Fri. Jul 29, 2016 - 04:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Managed to sneak a few hours in on this project, and I think it is almost completed.

The Audio / Video driver now has only 32 cycles free (out of 1144), but I managed to squeeze this out of it...

 

- VGA at 184x240 VGA with 8 Colors

- 3 Voice Sound mixed into one output

- All 3 Voices have a range of a few Hz to KHz

- All 3 Voices have selectable Portamento option.

- Voice One has Vibrato and Ring Modulation Filter option.

- Realtime 8 bit Random Number Generator.

- Auto Erasing Video Buffer Memory.

 

And this all runs from the Audio / Video Engine, isolated from the user code.

User code has more than 50% of the CPU time free!

All registers are available to the user code, and one free timer.

 

Next rainy day, I will whip up some music for a quick demo and post a video.

 

Is anyone here interested in building this to test it?

You only need an ATtiny85, 4 resistors, 2 capacitors and a clock oscillator.

The oscillator is the only "non junk-box" part...

 

http://www.digikey.com/product-search/en/crystals-and-oscillators/oscillators/852334?k=&pkeyword=&pv276=8&FV=fff4000d%2Cfff8016e%2C22c04f7&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25

 

The oscillator is available at most electronics stores online, and a programmable type will also work.

 

Will post again soon.

Cheers!

 

Brad

 

 

 

 

 

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I picked up a 36 MHz oscillator a few months ago, for this very reason :)

 

Now I just need to find it...

 

I'm sure it's around here somewhere.  If not, I know where to get them by the boxful, and I'll be by there tomorrow or this week.

 

So post your code and schematic, or PM me if you prefer.  I'd be very happy to test it.  I have a few work projects on my plate at the moment, but I'll do my best to squeak in some time.

 

Bravo!
 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perfect, thanks!

 

I will add some music to the Ball Demo and then post a schematic and HEX file for verification.

You also have a fuse resetter, so that is good, as I am using all IO pins.

 

Once you can verify that all is well, I can begin to detail the source code.

Finally, the first project for the new Domain I grabbed a few years ago!

 

Say, is this source for 36MHz clocks available online?

Digikey is great for the "user programmable" oscillators, but they are worth a bit more.

 

I also intend to order a 38MHz clock, as I have not tested the ATtiny at that speed yet.

At 36MHz, the dozen various Tinys I have all worked perfectly in my extensive testing, which ran full program memory, full SRAM and all IO pin toggles at  the highest speed for weeks on end.

 

But at 40MHz, a few of the ATtiny85's had an issue doing LPM across the entire span of program memory. Near the 7K mark, some bytes were returned as zero.

So if I can squeeze another 2MHz out of them (reliably), then that will give me enough juice for a 4th Audio Voice!

 

Yeah, I treat my AVRs like I treat any product I own... take off the safety and run it at the razor's edge to get full satisfaction and performance!

When I get this one posted, I plan to issue an open challenge to anyone to show me an ARM (or any DIP) do more than what the overclocked ATtiny can do.

I have failed at making both an LPC ARM and a PIC32 do anything close to this, and I did spend a great deal of time learning assembly for both.

Now I won't even go into what can be done with an XMega running at 72MHz.... that's for another project!

 

Cheers!

Brad

 

joeymorin wrote:

I picked up a 36 MHz oscillator a few months ago, for this very reason :)

 

Now I just need to find it...

 

I'm sure it's around here somewhere.  If not, I know where to get them by the boxful, and I'll be by there tomorrow or this week.

 

So post your code and schematic, or PM me if you prefer.  I'd be very happy to test it.  I have a few work projects on my plate at the moment, but I'll do my best to squeak in some time.

 

Bravo!
 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Sun. Aug 7, 2016 - 02:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Say, is this source for 36MHz clocks available online?

I don't believe so.  It's a local shop which, 20 years ago, was called "Supremetronic".  Around then, they had to move from their location on prime real estate in the 'trendy' stretch of Queen Street West here in Toronto.  They 'merged' (i.e. shared space with) a computer shop (call Hodgson Computers, IIRC).  Around the same time, the hardware store and the paint store across the street began a similar common law marriage.  About five years later, all four businesses wound up sharing bunk beds in the same small room.

 

So this 'shop' is basically in the basement of a local 'Home Hardware' franchisee.  They're still referred to as Supremetronic by 'those in the know' ;-)

 

They have a vastly long wall of (perhaps several thousand) tiny little plastic drawers full of many common parts.  Much of their inventory is surely past it's 'best before' date, but it's a good local resource nonetheless.

 

They just happen to have a drawer full of 36.000 MHz can oscillators.  I tested mine when I picked it up a few months ago.  Seems to be solid.

 

They don't think have any 38 MHz or 40 MHz cans.

 

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Feed me! Feed me!... for such a small project, it sure has a large appetite.

 

In order to maximize my ability to create decent demo music for my Quark-85 platform, I am making a tracker that uses another AVR to emulate the sound functionality of Quark-85 and then record live from a hacked keyboard.

So now I have 3 pieces of supporting development hardware / softwre for this single ATiny project...

 

1) Quark-Loader - allows full use of the restriced reset pin under AS7 with an AVRisp programmer.

2) Quark-Converter - converts bitmaps into compressed or uncompressed assembly data for demo graphics.

3) Quark-Tracker - will allow the creation of 3 track music, saving data in assembly format.

 

To make Quark-Tracker, I found an old MIDI keyboard in my stockpile and promptly gutted everything...

 

 

The donor keyboard is perfect as my 8 bit Sound Engine can do 4 octaves with minimal pitch error.

After the 4th octave, margin of error climbs past 20% and the sound is worse than a modern pop star without auto-tune!

 

I know.... why not just use MIDI???

I prefer total control, so I plan to connect the keyboard matrix directly to an ATmega.

 

When composing, I also like a combination of live input as well as tracker style input, so this will work well.

A tracker simply cannot capture the nuance of live keyboarding, but a little quantizing is also nice to have.

 

 

Let's jack into the Matrix!

Two connectors inside, each with 16 pins. Most likely not all are used, so an ATMega328 will be just fine.

 

When this thing is complete, it will be something along of Linus Akesson's Chipophone, but specific to my Quark-85 Engine.

 

http://www.linusakesson.net/chip...

 

Once I have some decent Demo Music added, I will post a schematic and some test HEX files.

This project has been so much fun! Looking through 1000 lines of assembly to have an adrenaline rush when one cycle is shaved!

A project like this is a Kung Foo builder for sure.... "wax on, wax off".

 

Until the next rainy day....

 

Brad

 

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Tue. Aug 9, 2016 - 04:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When this thing is complete, it will be something along of Linus Akesson's Chipophone

I have been drooling for that thing for ages.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:

When this thing is complete, it will be something along of Linus Akesson's Chipophone

I have been drooling for that thing for ages.

 

Yeah... the dude's an inspiration!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Pages