This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0000 REM NOT YET TESTED on Z80 | |
| 0010 REM THIS PROGRAM PLAYS THE HIGH/LOW GAME. | |
| 0020 PRINT "I WILL PICK A NUMBER BETWEEN 1 AND 100" | |
| 0030 PRINT "THEN I WANT YOU TO TRY AND GUESS IT." | |
| 0040 PRINT "I WILL TELL YOU IF YOU ARE TOO HIGH, OR TOO LOW" | |
| 0050 C=0 | |
| 0060 N=1+R;?%100 | |
| 0070 INPUT "WHAT IS YOUR GUESS?",G | |
| 0080 C=C+1 | |
| 0090 LIF G==N THEN PRINT "YOU GUESSED IT IN ",C," GUESSES!":END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10 REM The factorial of a integer less than 85 | |
| 20 INPUT " Enter last integer number = ",N | |
| 30 FACT=1 | |
| 40 FOR I=1 TO N | |
| 50 FACT=FACT*I | |
| 55 PRINT I,FACT | |
| 60 NEXT I | |
| 70 PRINT " FACTorial of the entered Number is = ",FACT | |
| 80 END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REM Prime Numbers Calculation in BASIC | |
| REM This program lists all prime numbers up to a given limit | |
| CLS | |
| PRINT "=== Prime Numbers Calculator ===" | |
| INPUT "Enter the upper limit (positive integer): ", limit | |
| IF limit < 2 THEN | |
| PRINT "No prime numbers exist below 2." | |
| END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10 REM The sum of the first N natural numbers | |
| 20 INPUT " Enter last natural number = ",N | |
| 30 SUM=0 | |
| 40 FOR I=0 TO N | |
| 50 SUM=SUM+I | |
| 60 NEXT I | |
| 70 PRINT " Sum of all the natural numbers = ",SUM | |
| 80 END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/mit41301/Z80_CYCLONE_IV_EP4CE6E22C8 | |
| https://github.com/mit41301/OneWire_HDL | |
| https://github.com/mit41301/CH552E-NO-LED | |
| https://github.com/mit41301/RDA5807SS-P8X32A | |
| https://github.com/mit41301/y80e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -------------------------------------------------------------------------------- | |
| -- | |
| -- FileName: pwm.vhd | |
| -- Dependencies: none | |
| -- Design Software: Quartus II 64-bit Version 12.1 Build 177 SJ Full Version | |
| -- | |
| -- HDL CODE IS PROVIDED "AS IS." DIGI-KEY EXPRESSLY DISCLAIMS ANY | |
| -- WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT | |
| -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | |
| -- PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL DIGI-KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| `timescale 1ns / 1ps | |
| module led_test ( | |
| clk, // 开发板上输入时钟: 50Mhz | |
| rst_n, // 开发板上输入复位按键 | |
| led // 输出LED灯,用于控制开发板上LED | |
| ); | |
| //=========================================================================== | |
| // PORT declarations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module countpro(sys_clk,led); | |
| input sys_clk; | |
| output [3:0] led; | |
| reg [25:0] count; | |
| reg [2:0] led; | |
| always @(posedge sys_clk) | |
| begin | |
| count <= count + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries | |
| # | |
| # SPDX-License-Identifier: MIT | |
| """Example for Pico. Blinks the built-in LED.""" | |
| import time | |
| import board | |
| import digitalio | |
| led = digitalio.DigitalInOut(board.LED) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries | |
| # | |
| # SPDX-License-Identifier: MIT | |
| """ | |
| LED example for Pico. Blinks external LED on and off. | |
| REQUIRED HARDWARE: | |
| * LED on pin GP14. | |
| """ |
NewerOlder