element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
microbit
  • Learn
  • Learning Center
  • STEM Academy
  • microbit
  • More
  • Cancel
microbit
microbit Forum Problem with ISP on micro:bit
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join microbit to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 13 replies
  • Subscribers 50 subscribers
  • Views 3611 views
  • Users 0 members are here
  • shift register
  • micro:bit
  • digital write
  • python
  • bbc micro:bit
  • spi
  • tempus fugit
  • mu editor
  • chip select
  • protocol
  • spi not working
Related

Problem with ISP on micro:bit

balearicdynamics
balearicdynamics over 7 years ago

I have a strange issue with the micro:bit that I have no idea by what it can depends. Maybe also a behavioural detail I have not considered and I am expecting something that it is normal does not happens.

 

The scenario

For more detail on how the project is designed take a look to the blog posts on Tempus fugit...

 

Tempus Fugit... Part 1: 1978 a.d.  project intro

Tempus Fugit... Part 2: 2018 a.d. the components and the logic of the project

Tempus Fugit... Part 3: micro:bit Interfacing 5V Logic the first issue: interfacing 3.3 logic signals from micro:bit to 5V logic on IC. Tested and solved

Tempus Fugit... Part 4: micro:bit 5V SPI adopting the solution discussed in the previous blog post to my use case: 7-segments LED controller via SPI protocol.

 

The problem

Hardware seems working properly; with simple programs to control the pins involved by the SPI protocol (13, 14, 15 on the micro:bit) and testing with the oscilloscope bon both sides 3.3 V (output connector from the micro:bit) and 5V (input connection to the IC) these works perfectly and there are no problems. Then, I tried to implement in Python using MU the SPI protocol and on the same pins controlling with the oscilloscope nothing happens. To do this I have used the Python library to control the specific IC but none at all. I am not interested in this moment to see the display working. What I just need to understand is what can be the issue that is blocking the SPI protocol to work correctly, also when the test program runs on on the micro:bit without the controlled circuit connected to avoid interferences. The same behaviour happens on a second micro:bit board, while the digital output setting of the pins with the test program continue working; I can suppose that there is not any hardware problem.

 

Any suggestion and idea is more than welcome image

 

Enrico

  • Sign in to reply
  • Cancel

Top Replies

  • jc2048
    jc2048 over 7 years ago +4
    This code works with the Python Editor on their website # Add your Python code here. E.g. from microbit import * buf = bytearray(1) spi.init() while True: buf[0]=0xa4 spi.write(buf) sleep(20) these…
  • stevesmythe
    stevesmythe over 7 years ago +4
    Hi Enrico I have used SPI with the micro:bit a couple of times - with two different 7-seg displays. I can't see from your project what SPI controller IC you are trying to control. If you could post the…
  • balearicdynamics
    balearicdynamics over 7 years ago in reply to stevesmythe +4
    Hello Steve, Thank you for your support. Now it wkrkw and tomktrow I will setup the software. Enrico
Parents
  • dougw
    dougw over 7 years ago

    The only thing I do get SPI working with mu is run an init command during initiallization:

    spi.init(baudrate=1000000, bits=8, mode=0, sclk=pin13, mosi=pin15, miso=pin14)

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • dougw
    dougw over 7 years ago

    The only thing I do get SPI working with mu is run an init command during initiallization:

    spi.init(baudrate=1000000, bits=8, mode=0, sclk=pin13, mosi=pin15, miso=pin14)

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Children
  • balearicdynamics
    balearicdynamics over 7 years ago in reply to dougw

    Thank you Doug, I hope this is my mistake and not something stranger. I'll try this afternoon and let you know.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube