Hi Matt,
I hope you don't mind I have some comments on the samples you just
committed:
- comments and code don't match 100%
- too much 'left overs' of another sample
I maybe a little too strict, but in my view basic samples like these
should be as understandable as possible for the very beginner and should
contain only relevant and only correct info and no info which might be
confusing, let alone misleading.
-- this program assumes a 20 mhz resonator or crystal
-- is connected to pins osc1 and osc2.
pragma target osc INTOSC_NOCLKOUT -- hs crystal or resonator
;pragma target osc hs -- hs crystal or resonator
;pragma target clock 20_000_000 -- oscillator frequency
- the first 2 lines are incorrect and confusing
- same for the comment on the third line
- the last 2 lines are irrelevant and should not be there
;OSCCON_IRCF = 0b110 -- set int osc to 4mhz
OSCCON_IRCF = 0b111 -- set internal osc to 8mhz
I don't understand why you kept the first of these lines, it has no
function at all.
counter = counter - 1;
if (counter == 0) then
counter = 50000
serial_hw_data = "."
end if
(maybe more for Joep than for you:) Without any comments I wonder if a
beginner will understand what the function of these statements is.
Regards, Rob.
On 6-10-11 10:28, [email protected] wrote:
Revision: 2801
Author: [email protected]
Date: Thu Oct 6 01:28:08 2011
Log: serial hardware sample for 18f4620 & 18f67j50
http://code.google.com/p/jallib/source/detail?r=2801
Added:
/trunk/sample/18f4620_serial_hardware.jal
/trunk/sample/18f67j50_serial_hardware.jal
--
R. Hamerling, Netherlands --- http://www.robh.nl
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.