DIFFERENCE SPEED PORTC VS PORTB

Discuss general Uzebox topics here: features, wish list. nice to have, etc.
Post Reply
nono34
Posts: 30
Joined: Mon Jun 04, 2018 9:56 am

DIFFERENCE SPEED PORTC VS PORTB

Post by nono34 »

HELLO

I FOUND THAT THERE IS A DIFFERENCE SPEED BETWEEN PORTC AND PORT B

atmega644p

voltage vcc 5v25 (under dont start) current consumption >100ma

first of all clock at 40mhz with external clock fuze 010000

program in basic (may be in asm it is faster)

do
portc=0
portc=255
loop

speed mesured at oscilloscop 2.69mhz the same for porta and portd

do
portb=0
portb=255
loop

speed mesured at oscilloscop 5.76mhz

the frequency is stable in all case

does it mean that it is possible to double the pixel number on screen or double the color resolution by adding a latch like 74573 for reach 16 bit color

what did you think about
nono34
Posts: 30
Joined: Mon Jun 04, 2018 9:56 am

Re: DIFFERENCE SPEED PORTC VS PORTB

Post by nono34 »

THIS CODE GIVE 2.88MHZ ON PORTD AND C at same time

DO
PORTC=0
NOP
PORTD=0
NOP
PORTC=255
NOP
PORTD=255
LOOP

IF THE NOP ARE not set then it don t work
nono34
Posts: 30
Joined: Mon Jun 04, 2018 9:56 am

Re: DIFFERENCE SPEED PORTC VS PORTB

Post by nono34 »

IF I DISABLE INTERRUPTS ALL THE PORT OUTPUT A TTL SIGNAL AT 5.76MHZ

LET ABOUT 10MHZ BY PIXEL
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: DIFFERENCE SPEED PORTC VS PORTB

Post by CunningFellow »

I'm pretty sure at a hardware level PortB and PortC are just as fast as each other when using OUT in ASM.
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: DIFFERENCE SPEED PORTC VS PORTB

Post by D3thAdd3r »

If you are interested in that definitely try the existing stuff to get a feel for it first. The results you show for different port speeds must be some hard to predict quirk of whatever BASIC is in use there. Asm can be faster or smaller, but the main benefit is you know exactly how many cycles the code will turn into as you write it.
Post Reply