Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ATmega168 7-Segmentni Display
Spojio sam prema preporuci...i ovo je kod koji sam sada napisao da cita MSB i LSB sa MAX-a pa ako moze se bacit pogled jeli ok..posto mislim da moze biti kraci:

      ; *****      readThermoCouple     *****
      readThermoCouple:
                cbi PORTB,3 ; Enable CS Low
                ldi R20, 0x00 ; Dummy Byte
                out SPDR, R20 ; Send Dummy Byte

          Read_Temp_MSB:
                in R20, SPSR ; Read Data
                sbrs R20, SPIF ; Wait Unti Read Data
                ldi XH, HIGH(SPDR) ; Read Msb From MAX6675
                rcall Read_Temp_LSB
                rjmp Read_Temp_MSB

          Read_Temp_LSB:
                in R20, SPSR ; Read Data
                sbrs R20, SPIF ; Wait Unti Read Data
                ldi XL, LOW(SPDR) ; Read Lsb From MAX6675
                sbi PORTB,3 ; Disable CS High
                ret
                rjmp Read_Temp_LSB
      ret

Jeli ovako moze da cita MSB i LSB sa MAX-a? Gledam u proteusu da simuliram ali bezuspjesno...mora negdje da ima kakav datalogger...a za Floatipoint ALU u ASM cu kasnije da procavam kako se radi sad mi je cilj da ocitam MSB i LSB da mogu onda da radim shifting...

Dakle ako sam dobro razumio protokol SPI sa MAX treba da ide:

- CS postaviti na LOW
- poslati 0x00 byte na MAX
- procitati HIGH (MSB) Byte kada je SPIF 1
- poslati 0x00 byte na MAX
- procitati LOW (LSB) Byte kada je SPIF 1

sve to spremam u XH i XL registar sa kojima cu kad ovo proradi raditi shifting da se dobije 12 bita...
SAMO-BANOVAN OD 01.11.2024
Reply


Messages In This Thread
ATmega168 7-Segmentni Display - by ronovar - 03-29-2018, 07:44 PM
RE: ATmega168 7-Segmentni Display - by Milan94 - 03-29-2018, 08:37 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-29-2018, 09:27 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 03-30-2018, 10:43 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 03-29-2018, 09:55 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-29-2018, 10:12 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 03-29-2018, 10:31 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-29-2018, 10:38 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 03-29-2018, 11:02 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-30-2018, 07:43 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 03-30-2018, 08:17 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-30-2018, 09:41 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-30-2018, 10:51 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 03-30-2018, 11:17 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-30-2018, 11:33 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 03-30-2018, 12:01 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-30-2018, 02:46 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-30-2018, 12:14 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 03-30-2018, 12:24 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 03-30-2018, 12:32 PM
RE: ATmega168 7-Segmentni Display - by Milan94 - 03-30-2018, 03:55 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 03-30-2018, 04:23 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 03-30-2018, 05:26 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-30-2018, 06:08 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 03-30-2018, 08:07 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 03-30-2018, 08:25 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 03-30-2018, 09:52 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 03-30-2018, 10:21 PM
RE: ATmega168 7-Segmentni Display - by Želja - 03-31-2018, 08:31 AM
RE: ATmega168 7-Segmentni Display - by Macola - 03-31-2018, 12:52 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 03-31-2018, 01:57 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-01-2018, 02:11 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-01-2018, 02:23 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-01-2018, 03:00 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-01-2018, 08:17 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-01-2018, 09:22 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-01-2018, 09:24 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-01-2018, 09:32 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-01-2018, 09:45 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-01-2018, 09:41 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-01-2018, 09:53 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-01-2018, 09:48 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-01-2018, 09:59 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-01-2018, 10:04 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-01-2018, 10:09 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 08:39 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-02-2018, 09:23 AM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-02-2018, 10:04 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:17 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 08:54 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 09:28 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-02-2018, 09:34 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 02:01 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 03:42 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 02:41 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 03:44 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 04:28 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 04:40 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-02-2018, 04:55 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 05:05 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-02-2018, 07:57 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 08:17 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 07:58 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 08:24 PM
RE: ATmega168 7-Segmentni Display - by Milan94 - 04-02-2018, 09:11 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 09:40 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 10:21 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 10:31 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 10:37 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 10:51 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:05 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 10:57 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:11 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-02-2018, 11:08 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 11:15 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:17 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 11:20 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:21 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 11:25 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:30 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-02-2018, 11:27 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:49 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-03-2018, 07:19 AM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 11:28 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 11:48 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-02-2018, 11:52 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-02-2018, 11:56 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-03-2018, 12:03 AM
RE: ATmega168 7-Segmentni Display - by Želja - 04-03-2018, 07:25 AM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-03-2018, 10:16 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-03-2018, 07:50 AM
RE: ATmega168 7-Segmentni Display - by 1van - 04-03-2018, 10:05 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-03-2018, 10:24 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 10:56 AM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-03-2018, 11:21 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-03-2018, 11:37 AM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-03-2018, 12:02 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-03-2018, 12:06 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 12:11 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-03-2018, 12:48 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 04:16 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-03-2018, 04:34 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-03-2018, 08:02 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 08:52 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-03-2018, 09:15 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 09:30 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-03-2018, 09:39 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-03-2018, 09:55 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 09:58 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-03-2018, 10:05 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-03-2018, 10:07 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 10:16 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-03-2018, 10:24 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 10:34 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-03-2018, 10:42 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-03-2018, 11:14 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-03-2018, 11:25 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-03-2018, 11:52 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-04-2018, 12:00 AM
RE: ATmega168 7-Segmentni Display - by Macola - 04-04-2018, 12:14 AM
RE: ATmega168 7-Segmentni Display - by 1van - 04-04-2018, 07:03 AM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-04-2018, 12:30 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-04-2018, 06:20 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-04-2018, 08:58 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-04-2018, 09:53 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-04-2018, 10:00 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-04-2018, 02:08 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-04-2018, 03:23 PM
RE: ATmega168 7-Segmentni Display - by Macola - 04-04-2018, 03:53 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-04-2018, 10:27 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-05-2018, 05:06 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-05-2018, 06:47 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-05-2018, 08:52 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-08-2018, 10:48 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-08-2018, 06:49 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-08-2018, 08:16 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-08-2018, 09:17 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-08-2018, 11:09 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-09-2018, 08:28 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-09-2018, 11:56 AM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-09-2018, 12:21 PM
RE: ATmega168 7-Segmentni Display - by Makso - 04-09-2018, 12:24 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-09-2018, 01:01 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-09-2018, 02:13 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-10-2018, 08:21 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-10-2018, 03:52 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-10-2018, 07:58 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-10-2018, 08:32 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-10-2018, 08:54 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-10-2018, 09:35 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-10-2018, 09:51 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-10-2018, 09:52 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-11-2018, 06:54 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-11-2018, 07:08 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-11-2018, 08:39 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-11-2018, 08:44 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-11-2018, 10:09 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-11-2018, 10:48 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-11-2018, 11:13 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-12-2018, 12:14 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-12-2018, 06:51 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-12-2018, 08:15 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-12-2018, 09:35 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-12-2018, 09:42 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-12-2018, 09:57 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-12-2018, 10:05 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-12-2018, 10:14 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-12-2018, 10:30 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-12-2018, 10:48 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-12-2018, 11:05 AM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-12-2018, 11:36 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-12-2018, 11:56 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-12-2018, 05:33 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-12-2018, 10:51 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-16-2018, 09:00 PM
RE: ATmega168 7-Segmentni Display - by gorankg - 04-16-2018, 09:56 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-14-2018, 09:33 PM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-15-2018, 06:33 AM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-15-2018, 08:58 AM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-15-2018, 10:56 AM
RE: ATmega168 7-Segmentni Display - by vojinilic - 04-15-2018, 01:04 PM
RE: ATmega168 7-Segmentni Display - by mikikg - 04-15-2018, 01:51 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-16-2018, 10:02 PM
RE: ATmega168 7-Segmentni Display - by ronovar - 04-17-2018, 11:42 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)