ADC 8bit, legacy 10bit and 12bit using the public ADC methods (sub and functions).
The single CCP/PWM works - the 12 bit CCP/PWM works with timer 2.
Hardware Serial used through the demos. .
Interrupts - timers 8&16bit, external interrupts etc.
16bit hardware PWM. The 16bit PWM is set via registers..
EEPROM . This required major update to the library.
Mills()
I2C to GLCD remains to be tested.
SPI to LGCD remains to be tested.
SAF and Progmem writing remains to be tested.
Programming the Q41 chip
A challenge is programming the Q41. I have Great Cow BASIC working with a PICKitPlus version that the Q41 chips . I have added the Q41 parts to the PICKitPlus database. So, to program you need to use PICKitPlus, PICKit4 /SNAP or Northern Software Programmer (noting the issue with the NS is the need to power cycle the chip!... failure to do this will lead to total user confusion. I did confuse me for a day or so!!)
If you have a 18FxxQ41 please ask for the release candidate as it would be good to get the compiler tested.
Thank you,
Evan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The 18FxxQ41 was released byMicrochip in Fall 2020.
18FxxQ41 has a configurable Operational Amplifier (Op Amp) and Analog-to-Digital Converter (ADC) with computation, memory DMA and Digital-to-Analog Converters (DACs). It is particularly well-suited for IoT and large-scale artificial intelligence (AI) at-the-edge, including predictive maintenance edge nodes in a smart factory. Offered in compact 14- and 20-pin packages.
18FxxQ41 parts use a new process and only come in F version with a better internal regulator that doesn’t have as high a static current penalty as the previous FxxK parts (but still higher than LFxxK parts). Q18FxxQ41 parts run at full 64MHz over the full voltage range.
These chips operate at 1.8 to 5 volts all up to 64 MHz max including use of internal OSC.
The 12-bit ADC has Computation (ADC2 ) automating Capacitive Voltage Divider (CVD) techniques for advanced capacitive touch sensing, averaging, filtering, oversampling and threshold comparison.
16-bit PWM is extremely clever. And, Great Cow BASIC supports CCP/PWM and the 16-bit PWM. To use the new 16-bit PWM module to provides dual independent outputs on the same timebase you will have to use the datasheet, but, I have include a 16-bit PWM demo.
Just adding the 18FxxQ41 series. This is ONLY supported in v0.98.07 RC34 or greater.
Demonstrations are here: https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/tree/master/Vendor_Boards/Great_Cow_Basic_Demo_Board/18f16q41_chiprange_demonstrations
The demo covers the following:
Programming the Q41 chip
A challenge is programming the Q41. I have Great Cow BASIC working with a PICKitPlus version that the Q41 chips . I have added the Q41 parts to the PICKitPlus database. So, to program you need to use PICKitPlus, PICKit4 /SNAP or Northern Software Programmer (noting the issue with the NS is the need to power cycle the chip!... failure to do this will lead to total user confusion. I did confuse me for a day or so!!)
If you have a 18FxxQ41 please ask for the release candidate as it would be good to get the compiler tested.
Thank you,
Evan
The 18FxxQ41 was released byMicrochip in Fall 2020.
18FxxQ41 has a configurable Operational Amplifier (Op Amp) and Analog-to-Digital Converter (ADC) with computation, memory DMA and Digital-to-Analog Converters (DACs). It is particularly well-suited for IoT and large-scale artificial intelligence (AI) at-the-edge, including predictive maintenance edge nodes in a smart factory. Offered in compact 14- and 20-pin packages.
18FxxQ41 parts use a new process and only come in F version with a better internal regulator that doesn’t have as high a static current penalty as the previous FxxK parts (but still higher than LFxxK parts). Q18FxxQ41 parts run at full 64MHz over the full voltage range.
These chips operate at 1.8 to 5 volts all up to 64 MHz max including use of internal OSC.
The 12-bit ADC has Computation (ADC2 ) automating Capacitive Voltage Divider (CVD) techniques for advanced capacitive touch sensing, averaging, filtering, oversampling and threshold comparison.
16-bit PWM is extremely clever. And, Great Cow BASIC supports CCP/PWM and the 16-bit PWM. To use the new 16-bit PWM module to provides dual independent outputs on the same timebase you will have to use the datasheet, but, I have include a 16-bit PWM demo.
Demos showcase these capabilities:
010_hello_world.gcb
020_blink.gcb
030_blink_another_way.gcb
040_rotate_the_leds.gcb
050_show_a2d_value_on_leds.gcb
060_variable_rotate_the_leds.gcb
070_debounce_the_switch.gcb
080_using_the_reset_switch_as_an_input.gcb
090_reversible_leds_with_variable_delay.gcb
100_reversible_leds_with_variable_delay_to_serial_terminal.gcb
110_rotate_the_leds_using_16bit_timer0_.gcb
120_use_pwm_via_ccp_and_adc_to_control_led_brightness.gcb
130_rotate_the_leds_using_8bit_timer0.gcb
140_rotate_the_leds_using_the_timer_overflow_event.gcb
150_show_i2c_devices_to_serial_terminal.gcb
160_showing_eeprom_data_to_serial_terminal.gcb
170_using_external_interrupt_to_raise_an_event.gcb
180_ensuring_program_matches_chip_specfiied_to_serial_terminal.gcb
190_using_an_interrupt_to_manage_the_pwm_signal_to_control_an_leds_brightness.gcb
200_i2c_glcd_using_ssd1306_128_32.gcb
210_i2c_glcd_using_ssd1306_128_64.gcb
220_i2c_glcd_sprites_using_ssd1306.gcb
230_i2c_glcd_voltmeter_using_ssd1306.gcb
240_pwm_fixed_modes.gcb
250_pwm16bit_variable_modes.gcb
260_spi_glcd_using_ili9341.gcb
270_millis.gcb
280_showing_saf_data_to_serial_terminal.gcb
290_showing_progmem_data_to_serial_terminal.gcb
I will ensure all demos pass with v0.98.07 RC35 of Great Cow BASIC.
18FxxQ41 Tutorial #1
Basic setup and flash an LED
Last edit: Anobium 2021-01-19
18FxxQ41 Tutorial #2
Flashing for LEDs in sequence, showing the ASM produced, using ASM with the compiler and creating portable code.
18FxxQ41 Tutorial #3
Reading the ADC to set the state of the LEDs
18FxxQ41 Tutorial #4
Reading the 12bit ADC to set the delay period, also using Scale(), to set the LEDs