28x2 Resonator Pins

neiltechspec

Senior Member
Quickie question,
If I'm not using an external resonator, is it possible to use those pins for outputs.
The datasheet implies they can, so if it's possible how would I do it & refer to them ?

Neil.
 

papaof2

Senior Member
That appears to be a bit of a toss-up. In Manual 1 (2016 version) the 28X2 only shows the pins as Resonator and has C2 and C3 on other pins.
However, the 28X2 Module (AXE200/AXE201) shows those pins as Resonator and as C.2 (pwm/Out/In) and C.3 (hspi sck/hi2c sdi/Out/In) - plus some other bits in newer versions.

I think we need some Technical expertise.
 

hippy

Ex-Staff (retired)
The diagram in PICAXE Manual 1 which may appear to show resonator pins exposed for the AXE200/AXE201 modules is actually describing what the parts are on the module, the black rectangles, not the pins.

The resonator pins on 28X2 and 40X2 are dedicated to connecting a crystal or resonator and aren't available as I/O pins. That's part of the silicon design, not our simply not making them available for use.
 

neiltechspec

Senior Member
Hmmm,
Not 100% sure about that, from the datasheet, which refers to those pins as RA6 & RA7,

Pins RA6 and RA7 are multiplexed with the main oscillator pins;
they are enabled as oscillator or I/O pins by the selection of
the main oscillator in the Configuration register (see
Section 24.1 “Configuration Bits” for details).


But, I will live with them as not being usable in my application.
 

hippy

Ex-Staff (retired)
Yes, it's the setting of the bit which is required to allow crystal or resonator connection which precludes their use as I/O.

Configuration bits are not run-time programmable, can only be set on the production line, so you can have a chip which allows I/O but can't have a crystal or resonator connected, or allows that but precludes I/O.
 

Goeytex

Senior Member
This is a Picaxe limitation not a silicon limitation. The config bits are written whenever the flash program memory is written. In the case of a Picaxe, this is during "production programming ", meaning when the firmware is flashed onto the chip not when the actual PIC chip is manufactured. Picaxe needs to do it this way as the config bits must be fixed so that everything works as expected via the firmware.

With a bare PIC 18F25K22 programmed via MPLAB/XC8 , and other non-interpreted languages, most config bits can be changed re-written via the EECON registers during run-time. The config bits reside at Flash Memory locations 300000'h - 30000D'h.

These registers and memory addresses are not available to Picaxe users. If they were the Firmware could be corrupted and the chip "bricked" as far as still being a Picaxe. It would need to be re-flashed with firmware and that is not really possible.

Goey
 
Last edited:
Top