jremington:
Small wonder that you are having trouble!
Trouble with what? Being sold a product with different specifications or trying to find a register (or couple of register) set inside the 328P that would indicate the chip is running at 8Mhz vs 16Mhz? And by set, I do not mean set by the sketch. Remember the target is to obtain evidence the board does not meet the specification as advertised and sold.
jremington:
I can't believe you are asking this question.
TCCR1A = 1 tells you that bit zero of TCCR1A is set, which, if you look at the data sheet, is WGM01, corresponding to Timer Mode 1, phase correct 8 bit PWM (assuming that the other WGM bits are zero). See Table 16-4. Waveform Generation Mode Bit Description
If you are going to be programming timers, this sort of analysis should already be obvious to you. If it isn't obvious, come back when you have actually studied the data sheet.
That's the obvious part. I know bit 0/WGM10 is set. What I am asking is how TCCR1A == 1 is relevant to 16MHz vs 8Mhz. The Purpose of the thread.
I guess it wasn't obvious enough from the OP that this isn't the first time I have setup and used the T2 registers. I have this working on several Arduino platforms. Currently, I'm thrown off by the fact that (a) the Arduino site only lists a 16MHz version, (b) the authorized distributor lists the same 5V 16MHz 328P, (c) it would appear, that unless I made two compensatory errors, I have it configured correctly to provide the correct timing, (d) the timing is exactly double, which leads to the circumstantial conclusion that this isn't a 16MHz board as advertised. I do not take (a) as comprehesive, but combined with (b) expected to only be purchasing authorized (likely geniune) boards.
I was hoping there was someone on board that was aware of a register or registers in the 328P that would indicate directly the clock speed. I did not see any in the datasheet, hence the post. Hoping that someone with even more experience would know of a register or set of registers to conclusively determine this and thus request a refund. I'm sure making a phone with the "evidence" I have no will get me as far as this thread has gone.
adwsystems:
Yes and shouldn't need to. The new values are fully assigned.
TCCR2A = bit(WGM21); // normal operation
TCCR2B = bit(CS20) | bit (CS22);
TCCR2A=2 bit(WGM21)
TCCR2B=5 bit(CS20) | bit (CS22)
Don't forget this works perfectly on the UNO, Mega, and Pro Mini. This isn't my first rodeo. The setup is copied from Nick Gammon's website. Hopefully we all feel that is a reputable source.