Search found 3 matches
- Tue Jan 02, 2024 6:27 pm
- Forum: Newbies
- Topic: Coding for a DS18B20 single data line temperature sensor.
- Replies: 4
- Views: 4249
Re: Coding for a DS18B20 single data line temperature sensor
I wonder if Leo's code has a typo'? In my experience (PIC & Atmel) I toggle the data direction register bit while leaving the port latch bit set to '0'. I've attached a quick-n'-dirty port to 65C02 code for a couple of the low-level onewire read/write routines that I use (caveat: untested 65C02 ...
- Tue Jan 02, 2024 6:23 pm
- Forum: Newbies
- Topic: Coding for a DS18B20 single data line temperature sensor.
- Replies: 4
- Views: 4249
Re: Coding for a DS18B20 single data line temperature sensor
Main issue:
I think you have the DS18B20 connected to Bit7 of PortB of the VIA.
After
lda rgConfig
runs, A will contain your data bit from the DS18B20 in Bit7, not Bit0. The
asl
will move your data bit into the carry flag.
2nd issue:
The comments on
rgConfig = $6000 ; Write: D7 - output open ...
I think you have the DS18B20 connected to Bit7 of PortB of the VIA.
After
lda rgConfig
runs, A will contain your data bit from the DS18B20 in Bit7, not Bit0. The
asl
will move your data bit into the carry flag.
2nd issue:
The comments on
rgConfig = $6000 ; Write: D7 - output open ...
- Mon Jan 01, 2024 7:04 pm
- Forum: Newbies
- Topic: Coding for a DS18B20 single data line temperature sensor.
- Replies: 4
- Views: 4249
Coding for a DS18B20 single data line temperature sensor.
Hi - I'm largely a newbie to assembly language, so apologies for poor terminology etc!
Context - I've built a Ben Eater style 65C02 style computer ( on breadboards although changing over to a PCB shortly) which works fine. I want to eventually be able to display temperature and set myself the ...
Context - I've built a Ben Eater style 65C02 style computer ( on breadboards although changing over to a PCB shortly) which works fine. I want to eventually be able to display temperature and set myself the ...