News:

Let's find out together what makes a PIC Tick!

Main Menu

Strange case

Started by keytapper, Mar 20, 2025, 02:38 PM

Previous topic - Next topic

keytapper

Hello there,
I'm studying for some case on DTMF, then I tried a simple test
Device = 12F1840

Config1 FOSC_INTOSC, WDTE_OFF, PWRTE_OFF, MCLRE_OFF, CP_OFF, CPD_OFF, _
BOREN_OFF, CLKOUTEN_OFF, IESO_OFF, FCMEN_OFF
Config2 WRT_OFF, PLLEN_OFF, STVREN_ON, BORV_25, LVP_ON

Declare Xtal 8

DTMFOut PORTA.5, [5]
Compiler Version 4.0.4.1
Error: The code failed to assemble.

I inspect the assembler (attached here) and it seems good.
Ignorance comes with a cost

trastikata

Hi,

probably UTF encoding problem, there are non-standard ASCII characters at the beginning of your BAS file. Just select all in the BAS file, delete it, copy the code you posted here and paste it back, it should compile.

keytapper

Quote from: trastikata on Mar 20, 2025, 03:00 PMprobably UTF encoding problem.

I used the MElab editor. I'll try another editor and probably just call the compiler.
Ignorance comes with a cost

keytapper

Thanks trastikata,
you've spotted right on the issue. Whatever I typed manually into the editor I was using a different keyboard mapping.

I think Mr. Les should make an improvement and adding a unicode translation while parsing a line. Well, nowadays the programming accept writing comments and using keyboard mapping in coder's own language.
Ignorance comes with a cost

John Lawton

ASCII = AMERICAN Standard Code for Information Interchange.

7 bits should be enough for anyone

:)

John

flosigud

I have used computers with Icelandic keyboard for decades without problems. When programming I just don't use any extended characters. I comment in Modern English so the Old English characters in Icelandic get little use.

keytapper

I can't figure how the key pressed were converted. I have very similar attitude to avoid non ASCII characters in my sources.
The fact was that I'm using a Virtual Machine to run Windows program (as guest) while the host is Linux and normally I set my localization to map my the keyboard, regardless that is US keyboard I remember my mapping.
Ignorance comes with a cost

Fanie

Quotethere are non-standard ASCII characters
The DTMF smilies will follow in due time  ;)

keytapper

Quote from: Fanie on Mar 27, 2025, 12:12 AMThe DTMF smilies will follow in due time  ;)
I'm struggling to find a good choice for my 12F1840. My research led me few options. Probably not a Goertzel Algorithm and float variable.
For those that I found, I can't see results on VSM. Well I have a load with the DTMF simulation that's uses 8 sine waves and logic ICs driven by an Arduino. Arduino is interpreting the key press on a keypad 4x4.
Ignorance comes with a cost