Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find where the PIC sets the year value to what I'm receiving from FreHD #2

Open
telanoc opened this issue Feb 27, 2023 · 2 comments

Comments

@telanoc
Copy link

telanoc commented Feb 27, 2023

I wrote a simple program to poll the FreHD and show me the date and time values. For the year, I'm getting 0x7b, 123 decimal. That's the correct value for the time, but the chip is two-digit-year only. I don't see any code that adds 100 to the value sent to the TRS-80. The only place I see 100 being added is when the Reed HD header is being updated.

Is there a change you haven't checked in yet? I see that the FreHD I recently got from Ian has a 2.15 sticker on it.

Thanks

@veco
Copy link
Owner

veco commented Feb 27, 2023

Try this :

DS1307RD LD A,GETTIME
The rest is inside LSDOS, check the LSDOS programming manual where routines are described. I don't remember all the details (JacQ wrote this, as far as I remember)

@telanoc
Copy link
Author

telanoc commented Feb 27, 2023

I used that exact code to figure out how to write my little program to ask the FreHD for the bytes of date/time info. The 'inir' statement is transferring 3 bytes from the FreHD directly to the LDOS or LSDOS date and time storage locations. No LDOS functions are called for that, it's a direct memory write. There is also no other code to touch those bytes, and the year comes from the FreHD with 100 added to it. I'm just trying to figure out how that's possible given that the chip is 2-digit BCD. Something must be adding 100 to the year but it's not in the code on Github.

Sorry for being a pain in the behind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants