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 3599 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
  • jc2048
    jc2048 over 7 years ago

    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 are the output signals (yellow=clock,blue=data)

    image

     

     

    That's with the default init settings.

     

    But that's with the SPI in the microbit module. I don't know if working with MU is the same or whether you'd need to do something different.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • jc2048
    jc2048 over 7 years ago

    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 are the output signals (yellow=clock,blue=data)

    image

     

     

    That's with the default init settings.

     

    But that's with the SPI in the microbit module. I don't know if working with MU is the same or whether you'd need to do something different.

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

    Hi John,

     

    thank you for the experiment. I have done the same and got always the same result I got with MU. This is just an editor specific for micro:bit working on local files but includes all the libraries. Anyway, with the standard editor of microbit.org with your code, downloaded and sent to the board nothing happens. In both cases, using the micro:bit with the controller connected and with a different micro:bit board without any circuit. image

     

    As the pin themselves works fine when I use write_digital(), I suppose that there is something or some setting I am not making correctly but I have no idea what can it be done.

     

    Enrico

    • Cancel
    • Vote Up +3 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