Hi Kiste,

As a test I partly rewrote serial_hardware.jal to see if I could get it working 
with a PIC18F26K42. Initially I tried it with aliases but when errors occur it 
would not clear all errors so I did a short rewrite of that library. This 
version is not backwards compatible so it needs to have another name. For now I 
called is serial_hardware_plus.jal.

The transmission of data is working but the reception is not yet correct. It 
misses some characters when I type them. In order to get the baudrate correct I 
needed to set some aliases and a variable to get that correct (see the file 
serial_hardware_plus.jal). As I mentioned before I needed to set the USART pins 
to their default location by using PPS otherwise nothing will be output. See 
the test program for that.

I attached a test program (18f26k42_serial_hardware.jal) and the changed serial 
hardware library (serial_hardware_plus.jal) . As said the reception of data is 
not yet correct but it starts to work. I also attached a screenshot as 'proof' 
? that at least the transmission is OK.

Hope this helps.

Kind regards,

Rob


________________________________
Van: 'Oliver Seitz' via jallib <[email protected]>
Verzonden: maandag 1 juli 2019 18:10
Aan: [email protected]
Onderwerp: Re: [jallib] Re: PIC18F27K42, probably PPS problem

Hi Rob,

thank you for having a look :-)

I thought it might be best to think about a completely new backend for the 
uarts, as they have new possibilities, but are very different indeed from the 
older versions.

However, as I did not suffice to get neither serial nor PWM signals out of that 
chip, I would first want to check if the compiler produces the right bytes, it 
is the first 8-bit-chip ever with 64 memory banks. I had lots of "data check 
errors" when compiling.

Greets,
Kiste


Am Montag, 1. Juli 2019, 12:49:38 MESZ hat Rob CJ <[email protected]> 
Folgendes geschrieben:


Hi Kiste,

I had a look at this issue and I noticed that it is not sufficient to only add 
the INTCON alias. The problem is that there are more changes needed and I 
wonder if we can cover this all with aliases as to be able to cover all other 
PICs.

For example the library serial_hw_int_cts.jal checks in its interrupt routine 
PIR1_RCIF == TRUE but this flag is not available for the 18f27k42. There you 
should use PIR3_U1RXIF so there you need another alias.

Suggestions are welcome.

Kind regards,

Rob

________________________________
Van: 'Oliver Seitz' via jallib <[email protected]>
Verzonden: woensdag 12 juni 2019 18:01
Aan: [email protected]
Onderwerp: Re: [jallib] Re: PIC18F27K42, probably PPS problem

Hi Rob!

I would have suggested it that way, if

Am Montag, 10. Juni 2019, 13:18:20 UTC hat Rob Hamerling 
<[email protected]> Folgendes geschrieben:



Sorry, I should have used  'Reply List' (in Thunderbird)

-------- Forwarded Message --------
Subject:        Re: [jallib] Re: PIC18F27K42, probably PPS problem
Date:   Mon, 10 Jun 2019 15:15:59 +0200
From:   Rob Hamerling <[email protected]><mailto:[email protected]>
To:     Rob CJ <[email protected]><mailto:[email protected]>

Hi Rob!

I would have backed your suggestion... If there was something like "all 
INTCON_xxx  bitfields".

Unfortunately, the bitfields of INTCON and INTCON0 do differ:

e.g. 18f26k22
var volatile bit    INTCON_RBIF               at INTCON : 0
var volatile bit    INTCON_INT0IF             at INTCON : 1
var volatile bit    INTCON_TMR0IF             at INTCON : 2
var volatile bit    INTCON_RBIE               at INTCON : 3
var volatile bit    INTCON_INT0IE             at INTCON : 4
var volatile bit    INTCON_TMR0IE             at INTCON : 5
var volatile bit    INTCON_PEIE          at INTCON : 6
var volatile bit    INTCON_GIE_GIEH           at INTCON : 7

vs. 18f27k42
var volatile bit    INTCON0_INT0EDG           at INTCON0 : 0
var volatile bit    INTCON0_INT1EDG           at INTCON0 : 1
var volatile bit    INTCON0_INT2EDG           at INTCON0 : 2
var volatile bit    INTCON0_IPEN              at INTCON0 : 5
var volatile bit    INTCON0_GIEL              at INTCON0 : 6
var volatile bit    INTCON0_GIE               at INTCON0 : 7

Greets,
Kiste

On 2019/06/10 14:44, Rob CJ wrote:
I could add your change to the libraries so that it is included in the next 
release.

I think it is only sufficient to add this statement though:
-- Some newer PICs have INTCON registers numbered differently
   if (defined(INTCON0_GIE) == true) then
      alias INTCON_GIE is INTCON0_GIE
   end if


This may be helpful for the USART libraries, but what about other libraries and 
(sample) programs which use INTCON?
It looks better to me to add this alias and aliases for INTCON0 itself and 
aliases for all INTCON_xxx  bitfields  in the device file.

Regards, Rob.

--
Rob Hamerling, Vianen, NL

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/jallib.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/207a0c14-d89e-4098-fb8f-461415c36f06%40gmail.com<https://groups.google.com/d/msgid/jallib/207a0c14-d89e-4098-fb8f-461415c36f06%40gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/jallib.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/1406706930.483595.1560355311716%40mail.yahoo.com<https://groups.google.com/d/msgid/jallib/1406706930.483595.1560355311716%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/jallib.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/AM6PR0702MB370353D7E1E5DC6DBB4FF0D5E6F90%40AM6PR0702MB3703.eurprd07.prod.outlook.com<https://groups.google.com/d/msgid/jallib/AM6PR0702MB370353D7E1E5DC6DBB4FF0D5E6F90%40AM6PR0702MB3703.eurprd07.prod.outlook.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/jallib.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/639447824.1355464.1561997439288%40mail.yahoo.com<https://groups.google.com/d/msgid/jallib/639447824.1355464.1561997439288%40mail.yahoo.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/jallib.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/AM6PR0702MB3703CB0B6A93D2355454E354E6F80%40AM6PR0702MB3703.eurprd07.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: 18f26k42_serial_hardware.jal
Description: 18f26k42_serial_hardware.jal

Attachment: serial_hardware_plus.jal
Description: serial_hardware_plus.jal

Reply via email to