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

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

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

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

AtomicZombie wrote:
- AVR has a limited lifespan now. XMega will be the first to fall. - Within 2 years the phase out will all but make AVR disappear.
I'm astonished that someone so obviously smart can make such a misguided judgement. You may understand low level electronics better than almost anyone else here, but I fear you may have failed economics 101. surprise Do you really believe that Microchip bought Atmel ($1.4bn turnonver - $1bn from MCUs) simply as a spoiler tactic to remove them as competition? As you are about to find out there's a reason why major corporations (not just hobbyists) prefer AVR to PIC. The one thing PIC has going for it is that for volume production they are relatively cheaper in quantity. So corporations "make do" to save a few cents. But not all coroporations do because the $1bn that Atmel made from MCUs didn't come wholly from hobbyists in their back bedrooms.

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

AtomicZombie wrote:
I have no higher 5v clock, or I would have kept going.

3.3V though IIRC 3.3V CMOS -to- 5V TTL is simple but not simple to 5V CMOS.

Abracon

MEMSpeed Pro

http://www.abracon.com/memspeedpro/memspeedpro.html

...

1.0000 to 150.0000MHz

...

... 1uA Standby Current!!

...

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

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

Why the half measures? Can you still buy MC14500B 1 bit processors? That'd be a challenge.

 

I never used one myself. although I did write some great code for Toshiba 4 bit processors.

Four legs good, two legs bad, three legs stable.

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

clawson wrote:

AtomicZombie wrote:
- AVR has a limited lifespan now. XMega will be the first to fall. - Within 2 years the phase out will all but make AVR disappear.
I'm astonished that someone so obviously smart can make such a misguided judgement. You may understand low level electronics better than almost anyone else here, but I fear you may have failed economics 101. surprise Do you really believe that Microchip bought Atmel ($1.4bn turnonver - $1bn from MCUs) simply as a spoiler tactic to remove them as competition? As you are about to find out there's a reason why major corporations (not just hobbyists) prefer AVR to PIC. The one thing PIC has going for it is that for volume production they are relatively cheaper in quantity. So corporations "make do" to save a few cents. But not all coroporations do because the $1bn that Atmel made from MCUs didn't come wholly from hobbyists in their back bedrooms.

 

I totally agree that the 8 bit AVR range blows the PIC out of the water. It's not even a fair game!

But, I hold to my prediction, and will mark the date Feb22, 2018 to come back here to this thread and chime in if they keep this forum active!

 

Now when I say "AVR will be gone", I don't mean everything falls into a black hole, and agree that they didn't shell out the $$$ for nothing.

What I think will happen is this...

 

XMega gets the axe very soon. This only makes sense due to the cost, and PIC24 is there to fill the gap.

AVR32 falls next, as the PIC32 is a direct contender with more of a following.

The 8 bit AVR line (not XMega) will eventually become woven into the Microchip family and re-branded.

At this point, I would consider AVR "gone", even though the core may be around for decades as a PIC of some type.

Microchip can take the best of the AVR8 line and make it cost effective. This would be a good move.

AVRStudio will also get the axe as soon as possible, and Microchip will roll everything into MPLab.

 

At least, that's what I would do!

Being "smart" as a weekend hacker does not make me an expert economics-101 as you pointed out, but I believe what I believe regardless!

 

Brad

 

 

 

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

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

AtomicZombie wrote:
I have a PIC10F322, which is super minimal, and I am going to port this thing to it.

The challenge will be huge since it makes the ATTiny-85 look like a mainframe in comparison.

When you're done with the PIC10F322 would you try the new forthcoming ATtiny104 or ATtiny102?

It's in SOIC, so easy to prototype, and Atmel simplified that for the ATtiny104 :

Atmel Corporation

ATTINY104-XNANO

http://www.atmel.com/tools/ATTINY104-XNANO.aspx

...

http://www.atmel.com/Images/Atmel-45177-ATtiny102-and-ATtiny104-MCUs_Flyer.pdf 

http://www.atmel.com/Images/Atmel-42678-Getting-Started-with-Atmel-ATtiny102-104_ApplicationNote_AT12489.pdf

Atmel Corporation

Atmel Extends 8-bit MCU Leadership; Launches Industry’s Highest Performing 8-bit tinyAVRs with 1kB Flash

San Jose, CA, February 23, 2016

http://www.atmel.com/about/news/release.aspx?reference=tcm:26-80723

Ideal for Consumer, Industrial and Home Automation Markets, New 8-bit AVRs Deliver Industry’s Smallest And Lowest Power 8-bit MCU Solution on the Market Today with Just 1kB Flash

...

To accelerate the design process, Atmel offers a low-cost Xplained Nano evaluation kit available for only $4.44 USD in the Atmel Store.

...

The ATtiny 102/104 engineering samples are available today with mass production samples scheduled for May 2016.

...

 

Edits : flyer, getting started, press release.

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

Last Edited: Tue. Feb 23, 2016 - 07:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cool, somehow I missed the 6 pin Tiny-10. That will definitely be on the TODO list.

I only chose the PIC10 because it had only 6 pin and ultra low resources.

No doubt, the 12MIPs speed of the Tiny10 would tromp the 4MIPs PIC10.

I guess the prize would go to whichever I could overclock the furthest.

PIC10 would have to reach 120MHz to compete with AVR10 at 30MHz!

 

It is nice to be learning a new assembly language though. I often need change.

Brings back some of that excitement I had when I started with AVR ASM 10 years ago.

 

Brad

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

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

Interesting.  Engineering samples are "now available" (how?) but no datasheet yet.

 

EDIT: Never mind:

http://www.atmel.com/devices/ATTINY102.aspx

http://www.atmel.com/devices/ATTINY104.aspx

"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]

 

Last Edited: Tue. Feb 23, 2016 - 06:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ES parts onto the X series Atmel boards is good for a try.

Better than a business card wink
 

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

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

AtomicZombie wrote:

...

The 8 bit AVR line (not XMega) will eventually become woven into the Microchip family and re-branded.

At this point, I would consider AVR "gone", even though the core may be around for decades as a PIC of some type.

Microchip can take the best of the AVR8 line and make it cost effective. This would be a good move.

Hehe, if "the core may be around for decades" you can hardly argue that AVR is gone ?!

 

Uses do not care about the logo on the package, but they do care about software legacy.

 

Try this as a reality check :

“Atmel has already sold more units of its 8-bit AVR core-based MCUs than the 7.4 billion people on Earth,”

 

'PIC' is already just a brand, and tags a great many variable cores, none of which are binary compatible.

 

If you step back, and look at ST, Silabs eating PIC's lunch in the cheapest MCU space, the parts that have highest EOL threat post-merge are the smallest PICs, not the AVRs.

 

 

 

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

gchapman wrote:

When you're done with the PIC10F322 would you try the new forthcoming ATtiny104 or ATtiny102?

 

Nice parts, nice Eval, but just how does it stack up in Price/Performance in today's marketplace ?

 

EFM8BB1    2/4/8k  256/512/512 RAM        fo=8 MHz      12b ADC  18 io price 2kF/256R @ 1,000:$0.311 8kF/512R @ 1,000: $0.419

STM8S      8k      1k                     fo=16MHz      10b ADC  16 io price 3,000: $0.36400

Tiny102    1k      32 RAM (really Atmel?) fo=24.5 MHz   10b ADC   6 io Price 4,000: $0.502   12io  4000 $0.5540

PIC10F322  512W    64 RAM                 fo=16 MHz.4T  8b ADC    4 io price 3,000: $0.45

 

Tiny10x lacks small packages above 8 pins.

SiLabs has better Baud granularity, separate i2c, SPI, includes a BOOT loader, and ISP is via 2 pins, instead of 3

 

The biggest single gotcha, seems to be just 32 bytes of RAM.

For less $, SiLabs can give 8x Flash and 16x RAM, 3x MHz

 

It's been quite a while since I saw a new MCU released, with so little RAM.

 

From a merged Microchip-Atmel core perspective, it's easy to see an ATtiny family, displacing the smallest PICs

(just add more RAM)

 

Last Edited: Tue. Feb 23, 2016 - 08:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
From a merged Microchip-Atmel core perspective, it's easy to see an ATtiny family, displacing the smallest PICs (just add more RAM)

 

Definitely! The Tiny10 will easily outperform the PIC10F for about the same price.

The PIC10F does have 2 cool features though... CLC (Configurable Logic Cell), and NCO (Numerically Controlled Oscillator).

I might make use of both as I try to make it do the impossible task of displaying VGA graphics.

 

I have requested a few Tiny10s just now as well.

 

Brad

 

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

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

Who-me wrote:
Tiny10x lacks small packages above 8 pins.
tiny104 is SOIC-14 for a 125C (temperature) part.

Some assembly processes for the higher temperature PCBs require visual inspection of most of the solder joint; therefore, QFP, SOIC, SOP, etc.

Who-me wrote:
... includes a BOOT loader, and ISP is via 2 pins, instead of 3
SPM was added to tiny10x versus tiny10.

Could replace TPI with UART..

The challenge is creating a small bootloader; call for a contest?  smiley

 

 

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

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

gchapman wrote:

Who-me wrote:
Tiny10x lacks small packages above 8 pins.
tiny104 is SOIC-14 for a 125C (temperature) part.

Some assembly processes for the higher temperature PCBs require visual inspection of most of the solder joint; therefore, QFP, SOIC, SOP, etc.

Oh, I like SO14n - and you forgot to mention, it is also wave solderable.

It's just that many of the large markets need smaller packages, so a choice is what I was expecting.

To meet your gull-wing stipulation, in a small package, I like the MSOP10, same PCB area as SOT23, but more sane IO count.

 

gchapman wrote:

Who-me wrote:
... includes a BOOT loader, and ISP is via 2 pins, instead of 3
SPM was added to tiny10x versus tiny10.

Could replace TPI with UART..

The challenge is creating a small bootloader; call for a contest?  smiley

Atmel has Boot in ROM in the AT89 series, which is the ideal.

 

On a 1k part, I suspect choices are limited...

Last Edited: Tue. Feb 23, 2016 - 10:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The challenge is creating a small bootloader; call for a contest?

I think Ralph Doncaster's picoboot will be hard to beat.  Although a casual read of the datasheet for the 102/4 shows a few key differences from other tinies which would require special handling not currently part of picoboot.

"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

Wow, this PIC10F is a real strange one!

I noticed that it would easily overclock up to the highest clock I could find in my parts bin... 80MHz.

But if I remove the PICKit3 jack, it fails to overclock beyond 20MHz. Odd.

After 2 hours of messing around, I found that putting a 40-60 ohm resistor between the clock input pin and oscillator (in series) made it work!

 

I have no idea why!

Now I have a small trimmer pot in there, and as I hit the "sweet" spot, the scope output locks on, and looks perfect.

 

I am a few instructions away from getting VGA out of the 10F322, which is now running stable at 80MHz.

Will post some photos and a vid on my site. I don't want to flood this forum with PIC stuff!

 

Brad

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

Last Edited: Wed. Feb 24, 2016 - 01:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Post a link when it's up!yes

"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:
After 2 hours of messing around, I found that putting a 40-60 ohm resistor between the clock input pin and oscillator (in series) made it work!

 

I have no idea why!

Now I have a small trimmer pot in there, and as I hit the "sweet" spot, the scope output locks on, and looks perfect.

Some oscillators appear able to drive a coax cable of some length; otherwise that's way too much drive current.

The reflection(s) can cause the MCU's ESD suppression to activate injecting current (causing who knows what) and possibly shorting the ESD suppression.

Series termination is one of several methods.

Some oscillators have series termination as a part identifier, or, can be configured for output resistance.

Terminator I

by Dr. Howard Johnson

http://www.sigcon.com/Pubs/edn/TerminatorOne.htm

...

Unfortunately, even with a perfect external termination, the 9-pF capacitance of the FPGA input creates massive reflections (Figure 1).

...

Stay tuned for my next column, when we will work on the answer together.

...

(then browse there smiley

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

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

gchapman wrote:

AtomicZombie wrote:
After 2 hours of messing around, I found that putting a 40-60 ohm resistor between the clock input pin and oscillator (in series) made it work!

 

I have no idea why!

Now I have a small trimmer pot in there, and as I hit the "sweet" spot, the scope output locks on, and looks perfect.

Some oscillators appear able to drive a coax cable of some length; otherwise that's way too much drive current.

The reflection(s) can cause the MCU's ESD suppression to activate injecting current (causing who knows what) and possibly shorting the ESD suppression.

Series termination is one of several methods.

Some oscillators have series termination as a part identifier, or, can be configured for output resistance.

Terminator I

by Dr. Howard Johnson

http://www.sigcon.com/Pubs/edn/TerminatorOne.htm

...

Unfortunately, even with a perfect external termination, the 9-pF capacitance of the FPGA input creates massive reflections (Figure 1).

...

Stay tuned for my next column, when we will work on the answer together.

...

(then browse there smiley

 

Thanks, this is good information.

Looks like dropping the trimmer in series was a good way to go then. It's like tuning an RF circuit now!

I put in a new clock, slowly turn the variable resistor with a small screwdriver, and POP!... it hits the spot and the monitor locks.

It was a total fluke that I discovered this bizarre overclocking hack, and will be trying it on the AVRs soon as well.

 

Without the "VR Tweak Hack", the PIC maxed at 20MHz. The ATiny is able to do 36MHz without the hack. I wonder what it will really do?

Would be cool to be able to tweak the ATiny-85 up to 80MHz as well. Imagine the power!

 

This is definitely getting a write-up on my site. It's been years since I put anything up, but this one is too cool not to.

 

Back on the Quark subject, I know that I overestimated the PIC now. This 4 CLK per INS is painful as hell!

Even the Timers run at CLK/4, which had me banging my head for some time.

Anyone that thinks comparing 8 Bit AVR to 8 Bit PIC is a close game is wholeheartedly delusional!!

But, this is why I am having fun. Getting ANY video out of this thing is going to be a challenge indeed.

Even overclocked at 80MHz (only 20MIPs), I have only found a way to drive 85 horizontal pixels!

Compare this to the ATiny, which at 36MHz can drive up to 310 horizontal pixels (in color to boot).

 

Anyhow, I enjoy this kind of thing, and it certainly has no real value besides "edutainment".

I sure hope the ATiny series replace the PIC10 and 12 series when the "transition" begins.

Brad

 

 

 

 

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

Last Edited: Wed. Feb 24, 2016 - 01:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

Back on the Quark subject, I know that I overestimated the PIC now. This 4 CLK per INS is painful as hell!

Even the Timers run at CLK/4, which had me banging my head for some time.

Anyone that thinks comparing 8 Bit AVR to 8 Bit PIC is a close game is wholeheartedly delusional!!

But, this is why I am having fun. Getting ANY video out of this thing is going to be a challenge indeed.

Even overclocked at 80MHz (only 20MIPs), I have only found a way to drive 85 horizontal pixels!

Compare this to the ATiny, which at 36MHz can drive up to 310 horizontal pixels (in color to boot).

 

Even 85 pixels is enough to do a Clock or Stop-Watch / Timer, which could still be useful in teaching ?

The EFM8LB1 can do ~320 8 bit Colour pixels, with no overclocking needed.

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

Four times slower and no compare instructions!

... oh how I have been spoiled.

 

Brad

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

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

Who needs a compare when you have an XOR! In the days of the sc/mp if you needed to do a series of compares, you'd xor with an immediate, then the bext compare was xor with the immediate xored with the previous immediate and so on. Made for some obscure code for sure!
Seriously, the efm8 should provide plenty of edutainment.

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

Yeah, I have been learning the PIC8 "workarounds"! Sadly, each time it means 4-16 cycles.

Now I am trying to keep compares under 8, and using shifts and bit compares instead.... ack!

I found a way to count to the 636 horizontal lines using a divide by 3 system that only eats half the cycles of doing the usual subtract and compare PIC routine.

 

These PICs feel like a small step up from an 555 timer in comparison to ANY AVR!

Even the 6502 seems like a mainframe. I guess back in the day, it made sense to make something so minimal.

I hope the PIC24 has a much better instruction set, or I am going right for the 32MX next.

Oh well, I am doing it for the challenge, and so far it has proven to be more than I bargained for.

 

Not going to quit until this 64 byte uC is playing some kind of game on a VGA monitor!

 

Brad

 

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

Last Edited: Thu. Feb 25, 2016 - 03:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We did warn you! Its normally two or three instructions to do anything useful. I would write macros to make the instruction set more useful. If you think how you'd build a pic8 in a fpga, it would be quite simple - the opcode is effectively microcode. It was a clever design to use the minimum amount of silicon.
The pic24 is closer to the avr methinks.

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

AtomicZombie wrote:
It's like tuning an RF circuit now!
You're pushing the capability of your prototyping method; keep all legs, signal and return, of those fast circuits (current loops) as small as possible (consider soldering the oscillator to the MCU).

AVR spec clock rise-time is somewhat reasonable for a solderless breadboard; the exception is XMEGA (external clock, pre-scaled, rise-time is 1ns max).

Might consider moving away from a solderless breadboad to through-hole or SMT prototyping over a ground plane.

AtomicZombie wrote:
This is definitely getting a write-up on my site.
Am looking forward to it!

AtomicZombie wrote:
... and it certainly has no real value besides "edutainment".
Proposed value :

  • Secondary, and maybe primary, education.  It does something appealing (video games) besides blinking an LED.
  • Something to do while one is cooling their heels in a waiting room (rare when it's stocked with good magazines).
  • The spare video monitor can be doing "something".

AtomicZombie wrote:
I sure hope the ATiny series replace the PIC10 and 12 series when the "transition" begins.
Likely more complement.

Once a design works and has volume production it usually does not change unless a part goes EOL.

It's onwards to the next design.

 

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

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

Kartman wrote:
If you think how you'd build a pic8 in a fpga, it would be quite simple - the opcode is effectively microcode.

Only 308 FPGA LUTs required to create cycle-accurate 8088/8086 soft processor core

by

February 18, 2016

http://www.embedded.com/electronics-blogs/max-unleashed-and-unfettered/4441454/Only-308-FPGA-LUTs-required-to-create-cycle-accurate-8088-8086-soft-processor-core

...

Hi Max, I just wanted to let you know that we've released the MCL86 -- a micro-sequencer-based, cycle-accurate 8088/8086 soft processor core that consumes only 308 LUTs, which is less than one percent of the smallest Kintex-7 FPGA from Xilinx.

...

Edward also included the following photograph of his "Time-Warp" 1985 workstation.

...

The point is that this computer display is being driven by his MCL86 core -- pretty nifty, eh?

...

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

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

Does anyone here remember that this is still an AVR forum? I do recall a long time forum member being soundly and repeatedly criticized for even suggesting that a pic might be a better choice for a particular application. Leon was even banned for a while. I have nothing but admiration for AZ, but there is a forum that would be better suited for this part of the thread, or is there a double standard at work here?

 

This is still an Atmel forum for Atmel products, so where are  all the MicroChip critics that hounded Leon? You're awfully quiet.

 

 

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

But Microchip bought out Atmel (or is in progress) so technically a Microchip forum also now. blush

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

so technically a Microchip forum also now.

Not yet.  Not even a little.

"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

js wrote:

But Microchip bought out Atmel (or is in progress) so technically a Microchip forum also now. blush

 Yes, the cultural shifts this will bring over time, will be interesting to watch.

Already, the tin-rattling is less than it was.

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

Already, the tin-rattling is less than it was.

That's only because all the tin-rattlers are like Kent Brockman, hedging their bets with their new insect overlords ;-)

"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

RickB wrote:

Does anyone here remember that this is still an AVR forum? I do recall a long time forum member being soundly and repeatedly criticized for even suggesting that a pic might be a better choice for a particular application. Leon was even banned for a while. I have nothing but admiration for AZ, but there is a forum that would be better suited for this part of the thread, or is there a double standard at work here?

 

This is still an Atmel forum for Atmel products, so where are  all the MicroChip critics that hounded Leon? You're awfully quiet.

 

 

No arguments there!

I was always quick to jump on the PIC roasting bang wagon, and still am!

This thread is about my Quark VGA Engine, and I am porting it to a small PIC10F just to compare it against the AVR Tiny85.

In the end, this will ALWAYS be an AVR project.

 

I could move this to my own website if it seems to be "stinkin' up the joint"!

To be honest, I just don't get that fun community feeling over at the "other" forum, so I don't know if I will ever post there.

 

I appreciate the feedback. It was never my intention to dirty up the place!

 

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

 

Brad

 

 

 

 

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

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

Brad,

 

Just for the record, I am personally comfortable with the thread content to date. It has been respectful and educational to date. No need for a change as far as I am concerned.

 

Cheers,

 

Ross

Moderator

 

Ross McKenzie ValuSoft Melbourne Australia

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

Yes, it just needs more source code (for each MCU under discussion)  ;)

 

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

RickB wrote:

Does anyone here remember that this is still an AVR forum? I do recall a long time forum member being soundly and repeatedly criticized for even suggesting that a pic might be a better choice for a particular application. Leon was even banned for a while. I have nothing but admiration for AZ, but there is a forum that would be better suited for this part of the thread, or is there a double standard at work here?

 

This is still an Atmel forum for Atmel products, so where are  all the MicroChip critics that hounded Leon? You're awfully quiet.

Well I don't know about my fellow moderators but I'm no longer censuring any talk about Microchip as it does seem fairly inevitable that the deal will complete and AVR will be just another Microchip brand. You can hardly oppose talk of Microchip (previously a competitor of Atmel and in direct competition to Atmel's support forum here) on what is effectively going to be a forum run by Microchip can you?!?

 

Personally I think it's about time for an open discussion about the relative merits of the two. It's particularly interesting to get an "inside" view of the two chip architectures from one of the engineers who possibly knows the AVR inside better than most of us could ever dream about knowing.

 

Those of us who have just "tinkered" with the two already have formed our own opinions which is why most of us are regular posters on an Atmel not a Microchip forum (though that's about to change!). The one major benefit I see in PIC is the cost. If you want a cheap micro in volume it is very hard not to be swayed to using PIC however irritating the architecture might be (sorry Microchip Gods who might be listening - but it's true!!).

Last Edited: Fri. Feb 26, 2016 - 01:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Rick:

Quote:
.... all the MicroChip critics that hounded Leon? You're awfully quiet.

Hounded ? As a moderator I often told Leon to stop his PIC-promotion on this Atmel AVR forum. I don't see anything wrong with that.

But now Microchip has taken over Atmel, the landscape/perspective has changed.

 

What is more important for me: this thread is one of those that keeps me coming back *every* day. The enthousiasm is contagious, it's smart, cute, and great.

Totally AVRfreaky !

 

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

Ok, thanks Freaks, I will keep on hammering away!

Just want to be clear...

 

Even though I own a PicKit now, when it comes to 8 bit uCs, I will keep using AVR until someone rips my AVRisp from my cold dead Zombie hands!

I needed to prove to myself how much difference there would be, and there is a HUGE difference.

On the 24 and 32 bit scale though, I would imagine that I will get along very nicely with the PIC series.

 

I shall post some photos and code as soon as I have a stable image coming out of the PIC10F.

Cheers!

 

Ps...

Thanks for the kudos Clawson!

Engineer is a bit lofty of a name for me though, I just hack away on electronics on free weekends!

 

Brad

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

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

We're all "engineers" here - some are just software engineers, some are hardware engineers and then there's the ones I really envy who are both!

 

(BTW if you were headed in a 32 bit direction I would suggest that AMR-Cortex is the way this particular planet is headed right now - anything else is pretty "niche" and that includes any 32 bit from Microchip - which, in part, I'm sure is why they are keen to get their hands on lots of lovely Cortex-M and Cortex-A from Atmel)

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

Seems to me he's not promoting the glories of PIC, but wondering if he can possibly make a pick do what a Tiny85 does

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

AMR-Cortex

What?!  Never!  Down with AMR!

"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

AMR is that popular brand "Advanced Machines are a RISC" ;-)

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

Ok, I managed to get "stable" VGA out of the little 10F.

For my initial tests, I am actually running off the internal 16MHz RC Oscillator.

I can report that its stability is a bit better than AVR, but the edges of my pixels do have some noise.

 

What is also interesting is that the IO switching speed on a PIC seems to be dependent on the clock source.

On the internal Osc, IO switching is so slow that there is a shadow. On a real clock, it is sharp.

To overcome this, I am driving the RGB directly form the IO with no resistor.

The monitor is probably seeing 3-4v when it should have only .7v, but it sure looks much better.

 

Running only on the internal 16MHz RC Osc, I have managed to get a whopping 40x240 resolution in 4 colors!

With an external clock, I loose 1 of the 3 IO pins, and am stuck back to a single color, but up to 160x240 resolution.

 

I think the first demo will be a simple color Pong style game on the internal Osc just to practice.

Too bad NTSC is dead as a doornail, as I could really jam out some good color and resolution with this thing!

 

For those considering learning PIC8 assembly... don't bother unless you are into self punishment!

 

Brad

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

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

AtomicZombie wrote:

Ok, I managed to get "stable" VGA out of the little 10F.

For my initial tests, I am actually running off the internal 16MHz RC Oscillator.

I can report that its stability is a bit better than AVR, but the edges of my pixels do have some noise.\\

How much noise ? Does decoupling, and a quiet regulator,  help ?

 

AtomicZombie wrote:

What is also interesting is that the IO switching speed on a PIC seems to be dependent on the clock source.

On the internal Osc, IO switching is so slow that there is a shadow. On a real clock, it is sharp.

That rather defies logic ? How can the IO edge know or care about where SysCLK comes from ?

Ground bounce effects, I could believe, which may give the illusion of edge effects.

 

 

AtomicZombie wrote:

Too bad NTSC is dead as a doornail, as I could really jam out some good color and resolution with this thing!

NTSC is not dead, just moved to a Niche more related to Cameras and security/safety.

Plenty of small monitors in the Automotive area have both Composite and VGA connectors, and the smallest ones tend to be Composite.

 

Character insertion over NTSC/PAL is one area still alive, as there are more cameras out there....

 

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

I found the source of the noise.

It was the PICKit programmer!

If you leave it connected, it causes noise when using an external clock.

Almost looks like some kind of carrier signal overlayed with the clock.

No big deal, it still works fine, and the noise disapears when the PICKit is removed.

 

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?

A real clock fed into the PIC makes the IO switching look razor sharp again on my scope.

But, not issue really, I am only doing this to cut my teeth on some PIC8 assembly.

 

Brad

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

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

Ok, the last hurdle was the INDF and FSR regs (AKA AVR-Z Register), and now I have a good handle on PIC8 assembly.

It didn't take that long to scale the Quark Engine into the PIC, but it certainly won't have anywhere near the Zing of the ATiny!

 

To really push myself, I decided to use only the 16MHz PIC internal clock, leaving my with 4MIPs to push out color VGA.

It would have been a breeze to do NTSC, but if I wanted the easy route, I would just get a Raspberry PI!

 

The end result is a fully bit-mappable screen with 60 x 60 resolution and 4 colors (Black, White, Yellow, Blue).

Depending on how the 2 Color Pins are wired, the color palette and vary (16 colors total).

 

For my initial test, I kept it simple and made 4 colored blocks bounce around the screen.

At this point, there is only single button input, and no sound, but I will add a joystick and sound soon.

The Video Engine leaves 110 instruction cycles to the Main Game Logic, which is not a whole lot!

But when you consider that an entire Horizontal Line is only 128 cycles... it's damn tight!!

 

Here are the timings I ended up using...

 

;-----------------------------------------------------------------------------------------------------------------------------------
;----------- VIDEO DRIVER INTERRUPT : 640/4 X 480/8 VGA STANDARD @ 4 MHZ = 16 MHZ CLOCK
;-----------------------------------------------------------------------------------------------------------------------------------  
;-- HSP : 064/4 = 016 FROM 000 TO 015
;-- HBP : 032/4 = 008 FROM 016 TO 024
;-- HPX : 400/4 = 100 FROM 024 TO 123
;-- HFP : 016/4 = 004 FROM 124 TO 127
;-- HCT : 512/4 = 128
;-- VLN : 480/8 = 060 FROM 000 TO 059
;-- VFP : 011/8 = 001 FROM 060 TO 060
;-- VSP : 002/8 = 001 FROM 061 TO 061
;-- VBP : 032/8 = 003 FROM 062 TO 064
;-- VCT : 525/8 = 065

Here is a video showing 4 single color block Sprites bouncing around the screen...

 

https://youtu.be/UnQIppe2ip0

 

So far, I would have to say that this Video Project has been my most challenging code to write!

Not because it was my first ever PIC assembly program, but due to the ultra low processing power.

With only 128 instruction cycles, I had to handle the entire Video Engine.

The output is still exactly to the 640x480 standard, and only has jitter due to the internal RC.

An external clock can be used, but then the output is forced back down to only one color.

 

I might have enough code space for a Breakout style game, or even a crude Omega Race.

When I have time again, I may even try to get that damn Checker Ball up on the screen!

 

This has been a lot of fun, and even though the result has zero purpose, I learned a LOT about optimizing.

There is not even one free cycle in the Video Engine, and balancing instruction cycles on a PIC is more difficult.

 

If I was actually going to code or do electronics professionally, I would want this knowledge for sure.

The Quark10 VGA Engine takes up less Bytes than the graphic that makes up your PC mouse pointer!!!

 

Ok, back to reality.... whatever that may be.

 

Cheers,

Brad

 

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

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

Now you can try the dsPIC & EFM8 ? :)

Another peg-point for this, would be to use the VGA connector price & Size, and look for MCUs that are less than that.

I find older HD15 at Digikey for  72c/1000, M or F,  those have a total PCB footprint of  16mm x 30.6mm. (less  ~15% for the 15 pins)

 

Find a MCU that can fit within that area, and under 72c ?

 

Silabs 50MHz ones start at 16k BB2 for  56c, or 16k BB3 for 60c, 24 pin 3x3mm

A 72MHz LB1 is 80c still 3x3mm (but less RAM)

 

The more compact VGA connectors like 634-015-274-992, (F only),  I find at $1.42/1000

 

PIC24 look to start from 92c for 4kF/512R, & 16k/1kR/32MHz, in 5x5 package, is $1.63

 

ATTiny85 is  72c for 8k/512R/20MHz/6io, or 77c for 4x4mm still 6io - so just meets the parity point.

 

ATXMEGA8E5-MU is $1.11 for 8k/1k/32MHz/26io/5x5mm   or $1.28 for  16k/2k, making the E5 better value than PIC24 at that size.

(tho PIC24 does come smaller & cheaper again, than smallest XMega)

 

Last Edited: Sun. Feb 28, 2016 - 08:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

I found the source of the noise.

It was the PICKit programmer!

If you leave it connected, it causes noise when using an external clock.

Almost looks like some kind of carrier signal overlayed with the clock.

No big deal, it still works fine, and the noise disapears when the PICKit is removed.

 

So you are saying the PIC tested has less RC Osc noise than ATtiny ?

Is that lower noise tolerable enough for VGA  ?  What is the trim step size ?

 

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?

A real clock fed into the PIC makes the IO switching look razor sharp again on my scope.

But, not issue really, I am only doing this to cut my teeth on some PIC8 assembly.

A real clock has less jitter, maybe that has some effect - eg how many samples is your scope overlaying here ?

Is your scope fast enough to do a single shot capture ?

 

The only real way CMOS true edge-speed can change, is if the Pin-Drive strength changes with RX/EXT mode. (unlikely)

 

 

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

Whacked.

"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:

The end result is a fully bit-mappable screen with 60 x 60 resolution and 4 colors (Black, White, Yellow, Blue).

Depending on how the 2 Color Pins are wired, the color palette and vary (16 colors total).

...

This has been a lot of fun, and even though the result has zero purpose, I learned a LOT about optimizing.

There is not even one free cycle in the Video Engine, and balancing instruction cycles on a PIC is more difficult.

I would not quite say zero purpose.  It does give a (very low) point on a performance curve.

 

That 60x60 should support a 5x7 LCD style font, to 10 chars wide by 7 Char rows, but already that is past the PIC10 RAM ?

 

The cheaper EFM8 should manage  ~18 chars of LCD font, by ~10 Char rows, and still (just?) fit inside the smallest 256 RAM part ?

Leaves 4 banks of registers and 44 bytes of RAM for vars.

Last Edited: Sun. Feb 28, 2016 - 11:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On a side note, had some time to get the feel of MPLabX.

I would rate it equal to AVRStudio, both being very good.

 

MPLab does not give as much feedback after an assemble, and I cannot figure out how to get it to display memory utilization after an assemble. Seems it will if you compile, but not if you assemble. Makes it difficult to know how much program memory you have left! No doubt, I must be missing this option, and did look over the manual a few times.

 

** Update **

I found it deep in the settings under "Load Symbols". Works great now.

 

On the plus side, it does not hang up like AVRStudio does when using the AVRisp. I often have to unplug the AVRisp and restart Studio.

 

Brad

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

Last Edited: Mon. Feb 29, 2016 - 04:40 PM

Pages